1

I am not able to get my JFileChooser to look like the Windows 7 file chooser dialog. I'm using Java 7.

What I want:

enter image description here

What I get: enter image description here

My app sets the look and feel in the main method before opening any Swing windows:

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

I tried manually assigning a Windows look and feel class to the JFileChooser with no success:

JFileChooser fileChooser = new JFileChooser();
WindowsFileChooserUI wui = new WindowsFileChooserUI(fileChooser);
wui.installUI(fileChooser);

I've also tried setting the look and feel via a system property at the command line, but that didn't help either.

-Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel

Any ideas? Thanks.

Michael
  • 34,873
  • 17
  • 75
  • 109
  • If you don't mind including a third party library, you could look at [xFileDialog](https://code.google.com/p/xfiledialog/) – MadProgrammer Nov 06 '14 at 20:42

0 Answers0