I don't like this ugly FileChooser layout in Linux.
This layout is used by any other program and is MUCH more beautiful.
Is this layout available in Java? If so, how?
Update: this project is dedicated to solving the problem.
I do not believe this is a duplicate. The suggested solutions in the other questions do not help the situation in Linux (GTK at least).
FileDialog
looks different than JFileChooser
, but really just as strange. It does not look like the file choosers of native GTK applications.XFileDialog
is Windows-only and falls back on JFileChooser
in GTK.VFSJFileChooser
does not have improved GTK LAF as a goal.Unfortunately I do not know of any file chooser that looks native in GTK. Hopefully someone else does.
The gtkjfilechooser is not working with newer JDK's like JDK7. This was reported 2011, but is not fixed yet.
On the other side, the AWT FileDialog
has been improved with Java 7 - including multiple file selection. Check linked JavaDoc for .
AWT's FileDialog looks different than JFileChooser, but really just as strange. It does not look like the file choosers of native GTK applications.
Talking about FileDialog of JDK7, this is not true anymore. Now, it looks exactly like the native one.
Btw., the same issue occurs on OS X, the it's JFileChooser
doesn't look very native too. Apple recommends the usage of FileDialog
instead of JFileChooser
:
Although each has its advantages, java.awt.FileDialog makes your applications behave more like a native Mac app. This dialog [FileDialog], [...], looks much like a Finder window in OS X.
[...]
The Swing dialog, [...], looks much less like an OS X dialog.
[...]
Unless you need a functional advantage of JFileChooser, use FileDialog instead.
(Source)
Last sentence seems to be common (for all *NIX?) between Linux and OS X. So finally:
If you don't have a (functional) reason for JFileChooser
, use AWT's FileDialog
instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With