Examples of createDialog()


Examples of javax.swing.JOptionPane.createDialog()

    JOptionPane optionPane = new JOptionPane(this,
        JOptionPane.PLAIN_MESSAGE, JOptionPane.DEFAULT_OPTION);
    if (parentView != null) {
      optionPane.setComponentOrientation(((JComponent)parentView).getComponentOrientation());
    }
    JDialog dialog = optionPane.createDialog(SwingUtilities.getRootPane((JComponent)parentView), dialogTitle);
    dialog.applyComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));   
    dialog.setResizable(true);
    // Pack again because resize decorations may have changed dialog preferred size
    dialog.pack();
    dialog.setMinimumSize(dialog.getPreferredSize());
View Full Code Here

Examples of javax.swing.JOptionPane.createDialog()

      });

    optionPane.selectInitialValue();

    JDialog dialog =
      optionPane.createDialog(frame,
                              Strings.get("remote_connect_title"));
    dialog.setVisible(true);
    dialog.dispose();

    if (!(optionPane.getValue() instanceof String)) { // We'll get an Integer if the user pressed Esc
View Full Code Here

Examples of javax.swing.JOptionPane.createDialog()

          JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION);
      JComponent parentComponent = SwingUtilities.getRootPane((JComponent)parentView);
      if (parentView != null) {
        optionPane.setComponentOrientation(parentComponent.getComponentOrientation());
      }
      JDialog dialog = optionPane.createDialog(parentComponent, this.dialogTitle);
      Dimension screenSize = getToolkit().getScreenSize();
      Insets screenInsets = getToolkit().getScreenInsets(getGraphicsConfiguration());
      // Check dialog isn't too high
      int screenHeight = screenSize.height - screenInsets.top - screenInsets.bottom;
      if (OperatingSystem.isLinux() && screenHeight == screenSize.height) {
View Full Code Here

Examples of javax.swing.JOptionPane.createDialog()

   
    public static String showPasswordDialog(Component parent, String title, int passFields, int icon)
    {
        final JPasswordField passwordField = new JPasswordField(passFields);
        JOptionPane pane = new JOptionPane(passwordField, icon, JOptionPane.OK_CANCEL_OPTION);
        JDialog dia = pane.createDialog(parent, title);
        dia.addWindowListener(new WindowAdapter()
        {
            @Override
            public void windowActivated(WindowEvent ev)
            {
View Full Code Here

Examples of javax.swing.JOptionPane.createDialog()

          Integer lL = this.getLogLvl(connString);
          ht_logLvl.put(dmtn_ref, lL);
          // ask for old log management choice :
          if (oldLogChoice==OLDLOG_THIS_TIME | oldLogChoice==OLDLOG_NOT_THIS_TIME) {
            JOptionPane jop = new JOptionPane("Do you want old log from gateway :\n"+jmxsurl+" ?", JOptionPane.QUESTION_MESSAGE, JOptionPane.OK_CANCEL_OPTION, null, new String[] {OLDLOG_THIS_TIME, OLDLOG_NOT_THIS_TIME, OLDLOG_ALWAYS, OLDLOG_NEVER}, OLDLOG_THIS_TIME);
            JDialog dialog = jop.createDialog(jp, "Old log management");
      //dialog.setModal(true);
      dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
      dialog.show();
      oldLogChoice = (String) jop.getValue();
      if (oldLogChoice==JOptionPane.UNINITIALIZED_VALUE) {
View Full Code Here

Examples of javax.swing.JOptionPane.createDialog()

        // to do this in the SwingWorker thread so it gets drawn
        String msg = MessageFormat.format(
                BUNDLE.getString("Please_Wait_Message"), file.getName());
        String title = BUNDLE.getString("Please_Wait_Title");
        JOptionPane waitMsg = new JOptionPane(msg);
        final JDialog dialog = waitMsg.createDialog(frame, title);
        SwingUtilities.invokeLater(new Runnable() {

            public void run() {
                dialog.setVisible(true);
            }
View Full Code Here

Examples of javax.swing.JOptionPane.createDialog()

    {
      JOptionPane pane = new JOptionPane(messages.getString("update.updateAvailable.message"));
      String yes = messages.getString("update.updateAvailable.yes");
      String no = messages.getString("update.updateAvailable.no");
      pane.setOptions(new String[] { yes, no });
      JDialog dialog = pane.createDialog(new JFrame(), messages.getString("update.updateAvailable.title", ecUpdater.getLatestVersion()));
      dialog.setVisible(true);

      Object selection = pane.getValue();

      if (selection.equals(yes))
View Full Code Here

Examples of javax.swing.JOptionPane.createDialog()

            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.show();
        }

        /**
 
View Full Code Here

Examples of javax.swing.JOptionPane.createDialog()

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

Examples of javax.swing.JOptionPane.createDialog()

            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.show();
        }

        /**
 
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.