views:

518

answers:

3

JFileChooser looks nothing like the native widget. I seem to remember reading some hack to get it look like the native widget but searching for it know i can't seem to find it again i came across posts that suggest using java.awt.FileChooser but that class does not seem to be in the distribution. How can i make JFileChooser make look like the native widget?

+2  A: 

Take a look at this page. It goes through a lot of UI tweaks, but the third one is most relevant: "Using the JFileChooser to get Mac file and folder icons."

Tim
+2  A: 

java.awt.FileDialog will be the classes the posts meant. It is, unsurprisingly, more limited that the Swing version. All Java SE implementations are required to have the FileDialog class (although headless configurations may not be able to do anything useful with it).

Tom Hawtin - tackline
+2  A: 

It may be worth a look at the Quaqua look and feel, it replaces the file chooser with a much better and more native version, including folder colouring etc.

Gareth Davis