File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes JFileChooser lookandfeel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JFileChooser lookandfeel" Watch "JFileChooser lookandfeel" New topic
Author

JFileChooser lookandfeel

Matti Poro
Ranch Hand

Joined: Dec 03, 2005
Posts: 41
I have a program that uses MetalLookAndFeel but JFileChooser doesn't look so nice with that lookandfeel. I wonder if it is possible to make JFileChooser have the native lookandfeel.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42595
    
  65
You could use an AWT FileDialog instead. That should be closer to the native LAF.


Ping & DNS - my free Android networking tools app
Matti Poro
Ranch Hand

Joined: Dec 03, 2005
Posts: 41
Thank you. It looks perfect.
Casper Maxwell
Ranch Hand

Joined: Aug 04, 2005
Posts: 88
In my experience if you do not apply look-and-feel separately to JFileChooser, you see initial LF. So i think you can apply a different LF to your JFileChooser. An example code is in the url below if you need (you need to call SwingUtilities.updateComponentTreeUI(..) only on JFileChooser):

How to change the look and feel of Swing applications
http://www.java-tips.org/content/view/762/2/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JFileChooser lookandfeel