Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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);
    }
}