Take the 2-minute tour ×

I've created MyFileChooser that extends JFileChooser. So I want to localize its UI. This code doesn't work - all labels are still in english. I tried to do it in this way: UIManager.put("MyFileChooser.lookInLabelText", rb.getString("lookInLabelText")); but it didn't help.

share|improve this question
why have you extended the chooser? Is the normal (that is not extended) chooser localized correctly? What exactly did you do? –  kleopatra Nov 20 '12 at 11:07
@kleopatra there are difference between full localized OS and accesible Locale, a few times asked similair question by OPS came from south part Europe (???) –  mKorbel Nov 20 '12 at 11:37
add comment

1 Answer

up vote 2 down vote accepted

You need to set those properties before you create the JFileChooser (for example, doing it in the MyFileChooser constructor is too late, because the super contructor is already called at that point).

You might work around (haven't tested) by calling updateUI() on the file chooser after setting the properties.

share|improve this answer
or by using SwingUtils by @Darryl –  mKorbel Nov 20 '12 at 11:45
add comment

Your Answer


