Package javax.swing

Examples of javax.swing.JOptionPane.createDialog()


        File f = new File("/Users/will/Documents/algorithm-tokenization.txt");
        Yoshikoder yk = new Yoshikoder();
        yk.show();
        ImportDocumentPanel panel = new ImportDocumentPanel(yk, f);
        JOptionPane pane = new JOptionPane(panel, JOptionPane.PLAIN_MESSAGE);
        JDialog dia = pane.createDialog(yk, "Import");
        dia.show();
    }
   
}
View Full Code Here


   
    public static void main(String[] args) {
        DemoDictionary dict = new DemoDictionary();
        DictionaryPanel panel = new DictionaryPanel(dict);
        JOptionPane pane = new JOptionPane(panel);
        JDialog dia = pane.createDialog((JFrame)null, "Title");
        dia.show();
        System.exit(0);
    }
   
}
View Full Code Here

    options[1] = useOldEncoding;
    options[2] = useAnotherEncoding;

    fileFilterDialog.setOptions(options);

    final JDialog dialog = fileFilterDialog.createDialog(null, "Default encoding changed...");
    useNewEncoding.addActionListener(arg0 -> {
      FileTreeModel.setCurEncoding(encoding);
      if(setEncoding == null)
        System.out.println("encoding null!!");
      setEncoding.setText(encoding);
View Full Code Here

    /**
     * Displays an error message.
     */
    public void displayError(String message) {
        JOptionPane pane = new JOptionPane(message, JOptionPane.ERROR_MESSAGE);
        JDialog dialog = pane.createDialog(parentComponent, "ERROR");
        dialog.setModal(false);
        dialog.setVisible(true);
    }

    /**
 
View Full Code Here

                super.displayError(message);
            } else {
                JOptionPane pane =
                    new JOptionPane(message, JOptionPane.ERROR_MESSAGE);
                JDialog dialog =
                    pane.createDialog(JSVGCanvas.this, "ERROR");
                dialog.setModal(false);
                dialog.setVisible(true); // Safe to be called from any thread
            }
        }
View Full Code Here

    /**
     * Displays an error message.
     */
    public void displayError(String message) {
        JOptionPane pane = new JOptionPane(message, JOptionPane.ERROR_MESSAGE);
        JDialog dialog = pane.createDialog(parentComponent, "ERROR");
        dialog.setModal(false);
        dialog.setVisible(true);
    }

    /**
 
View Full Code Here

            if (debug) {
                System.err.println(message);
            }
            JOptionPane pane =
                new JOptionPane(message, JOptionPane.ERROR_MESSAGE);
            JDialog dialog = pane.createDialog(JSVGViewerFrame.this, "ERROR");
            dialog.setModal(false);
            dialog.setVisible(true);
        }

        /**
 
View Full Code Here

                super.displayError(message);
            } else {
                JOptionPane pane =
                    new JOptionPane(message, JOptionPane.ERROR_MESSAGE);
                JDialog dialog =
                    pane.createDialog(JSVGCanvas.this, "ERROR");
                dialog.setModal(false);
                dialog.setVisible(true); // Safe to be called from any thread
            }
        }
View Full Code Here

            if (debug) {
                System.err.println(message);
            }
            JOptionPane pane =
                new JOptionPane(message, JOptionPane.ERROR_MESSAGE);
            JDialog dialog = pane.createDialog(JSVGViewerFrame.this, "ERROR");
            dialog.setModal(false);
            dialog.setVisible(true);
        }

        /**
 
View Full Code Here

        JLabel label = new JLabel("Please enter your password for username " + username + " (database "
            + descriptor.getDbURL() + ").");
        final JPasswordField jpf = new JPasswordField();
        JOptionPane jop = new JOptionPane(new Object[] { label, jpf }, JOptionPane.QUESTION_MESSAGE,
            JOptionPane.OK_CANCEL_OPTION);
        JDialog dialog = jop.createDialog("Password...");
        dialog.addComponentListener(new ComponentAdapter() {
          @Override
          public void componentShown(ComponentEvent e) {
            SwingUtilities.invokeLater(new Runnable() {
              @Override
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.