Java tutorial
import javax.swing.Action; import javax.swing.JFileChooser; import javax.swing.plaf.basic.BasicFileChooserUI; public class Main { public static void main(String[] args) { JFileChooser chooser = new JFileChooser(); BasicFileChooserUI ui = (BasicFileChooserUI) chooser.getUI(); Action folder = ui.getNewFolderAction(); folder.setEnabled(false); chooser.showSaveDialog(null); } }