Examples of selectInitialValue()


Examples of javax.swing.JOptionPane.selectInitialValue()

        Strings.get("ok"),
        Strings.get("cancel"),
        Strings.get("local"),
      });

    optionPane.selectInitialValue();

    JDialog dialog =
      optionPane.createDialog(frame,
                              Strings.get("remote_connect_title"));
    dialog.setVisible(true);
View Full Code Here

Examples of javax.swing.JOptionPane.selectInitialValue()

      optBtn[0] = new JButton("Continue");
      optBtn[1] = new JButton("Cancel");

      pane = new JOptionPane("Load session done: ", JOptionPane.QUESTION_MESSAGE, JOptionPane.DEFAULT_OPTION, null, optBtn, null);
      final JDialog dialog = pane.createDialog(wizard, "Loading Complete");
      pane.selectInitialValue();

      optBtn[0].addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent ev) {
          JwatSession newSession = e.getSession();
View Full Code Here

Examples of javax.swing.JOptionPane.selectInitialValue()

      optBtn[2] = new JButton("Cancel");

      pane = new JOptionPane("# observations processed: " + e.valToRead() + "\n# correct observations " + e.valReaded()
          + "\nTo see errors press Show Log", JOptionPane.QUESTION_MESSAGE, JOptionPane.DEFAULT_OPTION, null, optBtn, null);
      final JDialog dialog = pane.createDialog(InputPanel.this.getParentWizard(), "Loading Complete");
      pane.selectInitialValue();

      optBtn[0].addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent ev) {
View Full Code Here

Examples of javax.swing.JOptionPane.selectInitialValue()

      optBtn[2] = new JButton("Cancel");

      pane = new JOptionPane("# observations processed: " + e.valToRead() + "\n# correct observations " + e.valReaded()
          + "\nTo see errors press Show Log", JOptionPane.QUESTION_MESSAGE, JOptionPane.DEFAULT_OPTION, null, optBtn, null);
      final JDialog dialog = pane.createDialog(InputPanel.this.getParentWizard(), "Loading Complete");
      pane.selectInitialValue();

      optBtn[0].addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent ev) {
View Full Code Here

Examples of javax.swing.JOptionPane.selectInitialValue()

      optBtn[2] = new JButton("Cancel");

      pane = new JOptionPane("# observations processed: " + e.valToRead() + "\n# correct observations " + e.valReaded()
          + "\nTo see errors press Show Log", JOptionPane.QUESTION_MESSAGE, JOptionPane.DEFAULT_OPTION, null, optBtn, null);
      final JDialog dialog = pane.createDialog(InputPanel.this.getParentWizard(), "Loading Complete");
      pane.selectInitialValue();

      optBtn[0].addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent ev) {
View Full Code Here

Examples of javax.swing.JOptionPane.selectInitialValue()

        Border border = textField.getBorder();
        placeholderLabel.setBorder(new EmptyBorder(border.getBorderInsets(textField)));

        JDialog dialog = pane.createDialog(null, title);
        pane.selectInitialValue();

        dialog.addWindowFocusListener(new WindowFocusListener() {

          @Override
          public void windowLostFocus (WindowEvent arg0) {
View Full Code Here

Examples of javax.swing.JOptionPane.selectInitialValue()

        Border border = textField.getBorder();
        placeholderLabel.setBorder(new EmptyBorder(border.getBorderInsets(textField)));

        JDialog dialog = pane.createDialog(null, title);
        pane.selectInitialValue();

        dialog.addWindowFocusListener(new WindowFocusListener() {

          @Override
          public void windowLostFocus (WindowEvent arg0) {
View Full Code Here

Examples of javax.swing.JOptionPane.selectInitialValue()

                JOptionPane.getRootFrame() : parentComponent).getComponentOrientation());

        pane.setMessageType(messageType);
        JDialog dialog = pane.createDialog(parentComponent, title);

        pane.selectInitialValue();
       
        // These two lines are different from JOptionPane.showOptionDialog().
        dialog.setModalityType(Dialog.ModalityType.DOCUMENT_MODAL);
        dialog.setLocationRelativeTo(parentComponent);
       
View Full Code Here

Examples of javax.swing.JOptionPane.selectInitialValue()

    public static int showOptionDialog(Component parentComponent, Object message, String title,
            int optionType, int messageType, Icon icon, final Object[] options, Object initialValue) {
       
        JOptionPane pane = new JOptionPane(message, messageType, optionType, icon, options, initialValue);
        pane.setInitialValue(initialValue);
        pane.selectInitialValue();
        JSheet.showSheet(pane, parentComponent, new SheetListener(){
            public void optionSelected(SheetEvent e) {
                answer = e.getOption();
            }
        });
View Full Code Here

Examples of javax.swing.JOptionPane.selectInitialValue()

            JButton[] optionBtns = { saveBtn, dontSaveBtn, cancelBtn };
            pane.setOptions(optionBtns);

            // Set the default on the Don's Save button
            pane.setInitialValue(dontSaveBtn);
            pane.selectInitialValue();
           
            // The key event dispatcher used to catch the mnemonics for the options (without ALT)
            final KeyEventDispatcher mnemonicKeyEventDispatcher = new KeyEventDispatcher() {
               
                public boolean dispatchKeyEvent(KeyEvent evt) {
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.