Package javax.swing

Examples of javax.swing.JFileChooser.showDialog()


            createAndShowGUI();
          } catch (Exception e) {
            JFileChooser fc = new JFileChooser();
            fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);

            int returnVal = fc.showDialog(m_masterFrame,
                "Choose Install Location...");
            if (returnVal == JFileChooser.APPROVE_OPTION) {
              File file = fc.getSelectedFile();
              try {
                m_installpath = file.getCanonicalPath() + (m_isWindows ? "\\" : "/")
View Full Code Here


   * Selects a file, using the component JFileChooser.
   */
  private void selectDirectory() {
    JFileChooser fc = new JFileChooser();
    fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
    int returnVal = fc.showDialog(this, "Select folder");
    if (returnVal == JFileChooser.APPROVE_OPTION) {
                  File file = fc.getSelectedFile();
      if (file.isDirectory())
      {
        try{
View Full Code Here

                        }
                        return false;
                    }
                });
                chooser.setDialogTitle("Select a FindBugs plugin jar");
                int retvalue = chooser.showDialog(PreferencesFrame.this, "Install");

                if (retvalue == JFileChooser.APPROVE_OPTION) {
                    File f = chooser.getSelectedFile();
                    try {
                        // load and enable for project (if loaded)
View Full Code Here

        JButton browseButton = new JButton("Browse");
        browseButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent event) {
                JFileChooser fileChooser = new JFileChooser();
                int chooseResult = fileChooser.showDialog(filenameField, "Select");
                if (chooseResult == JFileChooser.APPROVE_OPTION) {
                    if (fileChooser.getSelectedFile().isFile()) {
                        setFile(fileChooser.getSelectedFile());
                    }
                }
View Full Code Here

                public boolean accept(File f) {
                    return "entities.xml".equals( f.getName() );
                }
            });
            dialog.setDialogTitle("Convert entities.xml to textile");
            int open = dialog.showDialog( null, "Convert" );
           
            if( open == JFileChooser.CANCEL_OPTION ){
                System.out.println("Conversion canceled");
                System.exit(-1);
            }
View Full Code Here

        if( targetDirectory == null ){
            JFileChooser dialog = new JFileChooser( targetDirectory );
            dialog.setFileSelectionMode( JFileChooser.DIRECTORIES_ONLY );
            dialog.setDialogTitle("Target Directory for textile files");
           
            int open = dialog.showDialog( null, "Export" );
           
            if( open == JFileChooser.CANCEL_OPTION ){
                System.out.println("Canceled canceled");
                System.exit(-1);
            }
View Full Code Here

            File cd = new File(".");

            JFileChooser dialog = new JFileChooser(cd);
            dialog.setFileFilter(new IndexFileFilter());
            dialog.setDialogTitle("Locate Confluence wiki html export");
            int open = dialog.showDialog(null, "Convert");

            if (open == JFileChooser.CANCEL_OPTION) {
                System.out.println("Conversion canceled");
                System.exit(-1);
            }
View Full Code Here

            JFileChooser dialog = new JFileChooser(htmlDirectory.getParentFile());

            dialog.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
            dialog.setDialogTitle("Target Directory for textile files");

            int open = dialog.showDialog(null, "Export");

            if (open == JFileChooser.CANCEL_OPTION) {
                System.out.println("Canceled canceled");
                System.exit(-1);
            }
View Full Code Here

            JFileChooser dialog = new JFileChooser(cd);
            dialog.setFileFilter(new TargetFileFilter("index.rst"));
            dialog.setDialogTitle("Step 1: odt2sphinx RST file");

            int open = dialog.showDialog(null, "Rename Images");

            if (open == JFileChooser.CANCEL_OPTION) {
                System.out.println("Rename Canceled");
                System.exit(-1);
            }
View Full Code Here

        if (renameFile == null) {
            JFileChooser dialog = new JFileChooser(rstDirectory.getParentFile());
            dialog.setFileFilter(new TargetFileFilter("rename.properties"));
            dialog.setDialogTitle("Step 2: rename.properties");

            int open = dialog.showDialog(null, "Rename Images");

            if (open == JFileChooser.CANCEL_OPTION) {
                System.out.println("Rename images canceled");
                System.exit(-1);
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.