Examples of requestFocus()


Examples of java.awt.Dialog.requestFocus()

                    // focus gain event is not posted to the SwtInputBlocker. 
                    //
                    // The workaround is to use Windows look and feel, rather than Metal.
                    // System.out.println("Bringing to front");

                    awtDialog.requestFocus();
                    awtDialog.toFront();
                }
            }
        });
    }
View Full Code Here

Examples of java.awt.Frame.requestFocus()

  {
    Frame jf = new Frame();
    jf.show();
    try
      {
        jf.requestFocus();
      }
    catch (NullPointerException npe)
      {
        harness.fail("Call to requestFocus generated a NPE");
      }
View Full Code Here

Examples of java.awt.TextField.requestFocus()

        TextField text = new TextField(defaultText, textWidth == -1 ? 15 : textWidth);
        middle.add(text);
        p.add(middle, "Center"); //$NON-NLS-1$
        if (echoCharacter != ' ')
            text.setEchoChar(echoCharacter);
        text.requestFocus();
        final OptionDialog dialog = new OptionDialog(QUESTION, p, CHOICES_OK_CANCEL, null);
        text.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                dialog.choice(CHOICE_OK);
            }
View Full Code Here

Examples of java.awt.Window.requestFocus()

    protected boolean validate() {
        // request focus
        Frame frame = new Frame();
        Window window = new Window(frame);
        window.requestFocus();
        int response = JOptionPane.showConfirmDialog(window, message, "Confirmation", JOptionPane.YES_NO_OPTION);
        return response == 0;       
    }
   
View Full Code Here

Examples of java.awt.peer.ComponentPeer.requestFocus()

            // A focus request made from outside EDT should not be associated with any event
            // and so its time stamp is simply set to the current time.
            time = System.currentTimeMillis();
        }

        boolean success = peer.requestFocus
            (this, temporary, focusedWindowChangeAllowed, time, cause);
        if (!success) {
            KeyboardFocusManager.getCurrentKeyboardFocusManager
                (appContext).dequeueKeyEvents(time, this);
            if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
View Full Code Here

Examples of javafx.scene.control.Button.requestFocus()

        if (btn.isDefaultButton()) {
            Platform.runLater(new Runnable() {
                @Override
                public void run() {
                    btn.requestFocus();
                }
            });
        }

        btn.setOnAction(new EventHandler<ActionEvent>() {
View Full Code Here

Examples of javafx.scene.control.PasswordField.requestFocus()

         * Carico i vari vaori del login, ed imposto gli eventi da gestire.
         */
        final PasswordField PASS_TXT = (PasswordField) getFromCacheNode("pass_txt");

        PASS_TXT.setText("");
        PASS_TXT.requestFocus();

        if (DEBUG) {
            PASS_TXT.setText("1234567890");
        }

View Full Code Here

Examples of javafx.scene.control.TextField.requestFocus()

    vBox.getChildren().add(textInput);
    vBox.getChildren().add(hBox);

    dialog.showDialog();

    textInput.requestFocus();

    return response;
  }

  public static void showOKDialog(Stage owner, String title, String message)
View Full Code Here

Examples of javafx.scene.layout.BorderPane.requestFocus()

                });
            }

            BorderPane bp = getMainBorderPane();
            pane.getChildren().add(bp);
            bp.requestFocus();

        }
    }

    public void dispose() {
View Full Code Here

Examples of javafx.scene.layout.Pane.requestFocus()

                    EffectFX.clearBlurEffect(n);
                });
            }

            pane.getChildren().remove(getMainBorderPane());
            pane.requestFocus();
        }
    }
}
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.