Package javax.swing

Examples of javax.swing.JOptionPane.selectInitialValue()


        });

        JOptionPane pane = new JOptionPane(panel, JOptionPane.QUESTION_MESSAGE, JOptionPane.OK_CANCEL_OPTION, null, null,
          null);
        pane.setComponentOrientation(JOptionPane.getRootFrame().getComponentOrientation());
        pane.selectInitialValue();

        placeholderLabel.setBorder(new EmptyBorder(textField.getBorder().getBorderInsets(textField)));

        JDialog dialog = pane.createDialog(null, title);
        dialog.addWindowFocusListener(new WindowFocusListener() {
View Full Code Here


        });

        JOptionPane pane = new JOptionPane(panel, JOptionPane.QUESTION_MESSAGE, JOptionPane.OK_CANCEL_OPTION, null, null,
          null);
        pane.setComponentOrientation(JOptionPane.getRootFrame().getComponentOrientation());
        pane.selectInitialValue();

        placeholderLabel.setBorder(new EmptyBorder(textField.getBorder().getBorderInsets(textField)));

        JDialog dialog = pane.createDialog(null, title);
        dialog.addWindowFocusListener(new WindowFocusListener() {
View Full Code Here

        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

        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

   private static Object show(String title, int type, Object message, Object[] options, Object initialOption) {
      if (options == null) { options = new Object[]{"Ok"};  initialOption = "Ok"; }
      JOptionPane p = new JOptionPane(message, type, JOptionPane.DEFAULT_OPTION, null, options, initialOption);
      p.setInitialValue(initialOption);
      JDialog d = p.createDialog(null, title);
      p.selectInitialValue();
      d.setAlwaysOnTop(true);
      d.setVisible(true);
      d.dispose();
      return p.getValue();
   }
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.