JFileChooser on OS X
Asked Answered
M

3

7

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?

Michalmichalak answered 2/6, 2009 at 1:7 Comment(0)
W
5

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).

Witcher answered 2/6, 2009 at 1:35 Comment(2)
"more limited" sure -- except in how the native file choosers are all infinitely superior to JFileChooser....Dorso
Superior in looks, perhaps, but missing basic features like being able to choose which format to save in make it kind of pointless overall. :(Howund
O
4

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."

Overcash answered 2/6, 2009 at 1:15 Comment(0)
E
4

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.

Ember answered 2/6, 2009 at 6:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.