Package javax.swing

Examples of javax.swing.JDialog.addWindowFocusListener()


    gb.setConstraints(strut, gc); panel.add(strut);
    JOptionPane pane = new JOptionPane(panel, JOptionPane.QUESTION_MESSAGE,
        JOptionPane.OK_CANCEL_OPTION);
    pane.setInitialValue(field);
    JDialog dlog = pane.createDialog(frame, Strings.get("circuitNameDialogTitle"));
    dlog.addWindowFocusListener(new WindowFocusListener() {
      public void windowGainedFocus(WindowEvent arg0) {
        field.requestFocus();
      }

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


                    final JDialog d = new JDialog(frame, popup.getName());
                    d.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
                    d.setModal(false);
                    d.add(popup);
                    d.pack();
                    d.addWindowFocusListener(new WindowFocusListener() {
                        public void windowLostFocus(WindowEvent e) {
                        }
                       
                        public void windowGainedFocus(WindowEvent e) {
                            frame.addWindowFocusListener(new WindowFocusListener() {
View Full Code Here

        gb.setConstraints(strut, gc); panel.add(strut);
        JOptionPane pane = new JOptionPane(panel, JOptionPane.QUESTION_MESSAGE,
                JOptionPane.OK_CANCEL_OPTION);
        pane.setInitialValue(field);
        JDialog dlog = pane.createDialog(frame, getFromLocale("circuitNameDialogTitle"));
        dlog.addWindowFocusListener(new WindowFocusListener() {
            @Override
            public void windowGainedFocus(WindowEvent arg0) {
                field.requestFocus();
            }
View Full Code Here

        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

        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

        accessTokenForm = new OAuth2GetAccessTokenForm(profile);
        final JDialog accessTokenFormDialog = accessTokenForm.getComponent();

        disclosureButton.addMouseListener(new DisclosureButtonMouseListener(accessTokenFormDialog, disclosureButton));

        accessTokenFormDialog.addWindowFocusListener(new AccessTokenFormDialogWindowListener(accessTokenFormDialog));

        JButton advancedOptionsButton = oAuth2Form.addButtonWithoutLabelToTheRight(ADVANCED_OPTIONS_BUTTON_NAME, new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                new OAuth2AdvancedOptionsDialog(profile, refreshAccessTokenButton);
View Full Code Here

            }
            @Override
            public void keyTyped(final KeyEvent e) {
            }
        });
        popup.addWindowFocusListener(new WindowFocusListener() {
            @Override
            public void windowGainedFocus(final WindowEvent e) {
            }
            @Override
            public void windowLostFocus(final WindowEvent e) {
View Full Code Here

        pane.selectInitialValue();

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

        JDialog dialog = pane.createDialog(null, title);
        dialog.addWindowFocusListener(new WindowFocusListener() {
          public void windowLostFocus (WindowEvent arg0) {
          }

          public void windowGainedFocus (WindowEvent arg0) {
            textField.requestFocusInWindow();
View Full Code Here

        pane.selectInitialValue();

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

        JDialog dialog = pane.createDialog(null, title);
        dialog.addWindowFocusListener(new WindowFocusListener() {
          public void windowLostFocus (WindowEvent arg0) {
          }

          public void windowGainedFocus (WindowEvent arg0) {
            textField.requestFocusInWindow();
View Full Code Here

        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

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.