Examples of grabFocus()


Examples of javax.swing.JButton.grabFocus()

        layout.setConstraint(
            cancelButton,
            new FrameConstraint(0.5, 5, 1.0, -35, 0.5, 80, 1.0, -10));
        cancelButton.setActionCommand("cancelPressed");
        cancelButton.addActionListener(this);
        cancelButton.grabFocus();
        add(cancelButton);
       
        JButton okButton = new JButton("OK");
        layout.setConstraint(
            okButton,
View Full Code Here

Examples of javax.swing.JFormattedTextField.grabFocus()

      @Override
      public void keyPressed(KeyEvent e) {
        if (e.getKeyCode() == KeyEvent.VK_DELETE ) {
          ((NumberEditor) spinner.getEditor()).getTextField().setText("");
        }
        myTextField.grabFocus();
      }
     
    })
      
     myTextField.addFocusListener(new FocusListener()
View Full Code Here

Examples of javax.swing.JLabel.grabFocus()

        panel.add(label, BorderLayout.SOUTH);
        panel.addMouseListener(new MouseListener() {
            @Override
            public void mouseClicked(MouseEvent e) {
                label.grabFocus();
            }

            @Override
            public void mouseEntered(MouseEvent e) {
            }
View Full Code Here

Examples of javax.swing.JLabel.grabFocus()

        panel.add(label, BorderLayout.SOUTH);
        panel.addMouseListener(new MouseListener() {
            @Override
            public void mouseClicked(MouseEvent e) {
                label.grabFocus();
            }

            @Override
            public void mouseEntered(MouseEvent e) {
            }
View Full Code Here

Examples of javax.swing.JLabel.grabFocus()

        final JLabel label = new JLabel("click here to loose focus");
        label.addMouseListener(new MouseAdapter() {
            @Override
            public void mousePressed(MouseEvent e) {
                label.grabFocus();
            }
        });

        JPanel panel = new JPanel(new BorderLayout());
        panel.add(f, BorderLayout.CENTER);
View Full Code Here

Examples of javax.swing.JPanel.grabFocus()

        frame.setContentPane(f);
        frame.setSize(500, 200);
        frame.setTitle(f.getClass().getName());
        frame.setDefaultCloseOperation(IFrame.EXIT_ON_CLOSE);
        frame.setVisible(true);
        f.grabFocus();

    }
}
View Full Code Here

Examples of javax.swing.JTextField.grabFocus()

        textField.setBorder(new EmptyBorder(0,3,0,0));

        new SimpleLaterInvocator() {
            public void execute() {
                textField.selectAll();
                textField.grabFocus();
            }
        }.start();
        selectCell(rowIndex, columnIndex);
        return textField;
    }
View Full Code Here

Examples of javax.swing.JTextField.grabFocus()

        textField.setBorder(new EmptyBorder(0,0,0,0));

        new SimpleLaterInvocator() {
            public void execute() {
                textField.selectAll();
                textField.grabFocus();
            }
        }.start();
        selectCell(rowIndex, columnIndex);
        return textField;
    }
View Full Code Here

Examples of javax.swing.JTextField.grabFocus()

      }
      catch(ModificationException me) {
        if(showErrors) {
          JOptionPane.showOptionDialog(this.parent.visualEditor, me.getMessage(), "Error", JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE, null, null, null);

          jtf.grabFocus();
        }

        return false;
      }
    }
View Full Code Here

Examples of javax.swing.JTextField.grabFocus()

      }
      catch(ModificationException me) {
        if(showErrors) {
          JOptionPane.showOptionDialog(this.parent.visualEditor, me.getMessage(), "Error", JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE, null, null, null);

          jtf.grabFocus();
        }

        return false;
      }
    }
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.