Package javax.swing

Examples of javax.swing.JTextField.selectAll()


            listEditorComp.addPropertyChangeListener(listPcl);
            listEditorComp.addFocusListener(new FocusListener() {

                public void focusGained(FocusEvent e) {
                    ActionFactory.get(ActionKey.LIST_RECEIVEREDIT).setEnabled(false);
                    listEditorComp.selectAll();
                }

                public void focusLost(FocusEvent e) {
                    if(listReceiversLst.isEditing()) {
                        listReceiversLst.editingStopped(null);
View Full Code Here


   * calls JTextField.selectAll() before returning it
   */
  @Override
  public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
    JTextField c = (JTextField) super.getTableCellEditorComponent(table, value, isSelected, row, column);
    c.selectAll();
    return c;
  }

}
View Full Code Here

        }
    }

    public void focus() {
        JTextField valueTextField = editorComponent.getTextField();
        valueTextField.selectAll();
        valueTextField.grabFocus();
    }

    private class DocumentListener extends DocumentAdapter{
        protected void textChanged(DocumentEvent e) {
View Full Code Here

                public void keyPressed(KeyEvent e) {
                    if(e.getKeyCode() == KeyEvent.VK_F && e.isControlDown()) {
                        e.consume();
                        filterToggleButton.setSelected(true);
                        searchField.requestFocus();
                        searchField.selectAll();
                    }
                }
            });
            statusCountPane.add(filterPane);
        }
View Full Code Here

                .setToolTipText("Days between emergencies = interval +- variance");
        semirandom.add(emergencyIntervalTF);
        emergencyIntervalTF.addFocusListener(new FocusListener() {
            public void focusGained(FocusEvent e) {
                JTextField tf = (JTextField) e.getComponent();
                tf.selectAll();
                Gui.tempValue = tf.getText();
            }

            public void focusLost(FocusEvent e) {
                JTextField tf = (JTextField) e.getComponent();
View Full Code Here

                .setToolTipText("Days between emergencies = interval +- variance");
        semirandom.add(emergencyIntervalVarianceTF);
        emergencyIntervalVarianceTF.addFocusListener(new FocusListener() {
            public void focusGained(FocusEvent e) {
                JTextField tf = (JTextField) e.getComponent();
                tf.selectAll();
                Gui.tempValue = tf.getText();
            }

            public void focusLost(FocusEvent e) {
                JTextField tf = (JTextField) e.getComponent();
View Full Code Here

                .add(emergencyList.get(index).startMonthTF);
        emergencyList.get(index).startMonthTF
                .addFocusListener(new FocusListener() {
                    public void focusGained(FocusEvent e) {
                        JTextField tf = (JTextField) e.getComponent();
                        tf.selectAll();
                        Gui.tempValue = tf.getText();
                    }

                    public void focusLost(FocusEvent e) {
                        JTextField tf = (JTextField) e.getComponent();
View Full Code Here

                .add(emergencyList.get(index).endMonthTF);
        emergencyList.get(index).endMonthTF
                .addFocusListener(new FocusListener() {
                    public void focusGained(FocusEvent e) {
                        JTextField tf = (JTextField) e.getComponent();
                        tf.selectAll();
                        Gui.tempValue = tf.getText();
                    }

                    public void focusLost(FocusEvent e) {
                        JTextField tf = (JTextField) e.getComponent();
View Full Code Here

                .add(emergencyList.get(index).minPatientsTF);
        emergencyList.get(index).minPatientsTF
                .addFocusListener(new FocusListener() {
                    public void focusGained(FocusEvent e) {
                        JTextField tf = (JTextField) e.getComponent();
                        tf.selectAll();
                        Gui.tempValue = tf.getText();
                    }

                    public void focusLost(FocusEvent e) {
                        JTextField tf = (JTextField) e.getComponent();
View Full Code Here

                .add(emergencyList.get(index).maxPatientsTF);
        emergencyList.get(index).maxPatientsTF
                .addFocusListener(new FocusListener() {
                    public void focusGained(FocusEvent e) {
                        JTextField tf = (JTextField) e.getComponent();
                        tf.selectAll();
                        Gui.tempValue = tf.getText();
                    }

                    public void focusLost(FocusEvent e) {
                        JTextField tf = (JTextField) e.getComponent();
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.