@Test public void testStuff() throws ClassNotFoundException, UnsupportedLookAndFeelException, InstantiationException, IllegalAccessException { try { if (ImprovedFileChooser.isMacOs) { System.setProperty("apple.laf.useScreenMenuBar", "true"); } else { for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { UIManager.setLookAndFeel(info.getClassName()); break; } } } ImprovedFileChooser fileChooser = new ImprovedFileChooser(); fileChooser.setPreferredSize(new Dimension(1000, 750)); fileChooser.showDialog(null, "Choose"); } catch (HeadlessException e) { } }
@Override public int showDialog(Component parent, String approveButtonText) throws HeadlessException { int returnValue = super.showDialog(parent, approveButtonText); this.dialog = null; return returnValue; }
ImprovedFileChooser extends JFileChooser { @Override public int showDialog(Component parent, String approveButtonText) throws HeadlessException { int returnValue = super.showDialog(parent, approveButtonText); this.dialog = null; return returnValue; } }
ImprovedFileChooser extends JFileChooser { @Override public int showDialog(Component parent, String approveButtonText) throws HeadlessException { int returnValue = super.showDialog(parent, approveButtonText); this.dialog = null; return returnValue; } ImprovedFileChooser();  ImprovedFileChooser(File currentDirectory);  ImprovedFileChooser(File currentDirectory, FileSystemView fsv); }
ImprovedFileChooser extends JFileChooser { @Override public int showDialog(Component parent, String approveButtonText) throws HeadlessException { int returnValue = super.showDialog(parent, approveButtonText); this.dialog = null; return returnValue; } ImprovedFileChooser();  ImprovedFileChooser(File currentDirectory);  ImprovedFileChooser(File currentDirectory, FileSystemView fsv); @Override int showDialog(Component parent, String approveButtonText); }
ImprovedFileChooser extends JFileChooser { @Override public int showDialog(Component parent, String approveButtonText) throws HeadlessException { int returnValue = super.showDialog(parent, approveButtonText); this.dialog = null; return returnValue; } ImprovedFileChooser();  ImprovedFileChooser(File currentDirectory);  ImprovedFileChooser(File currentDirectory, FileSystemView fsv); @Override int showDialog(Component parent, String approveButtonText); static final boolean isMacOs; }