@Override public void actionPerformed(ActionEvent ae) { textComponent.selectAll(); } };
public void focusGained(FocusEvent e) { textComponent.selectAll(); }
@Override public void actionPerformed(ActionEvent ae) { lastActionSelected = Actions.SELECT_ALL; textComponent.selectAll(); } };
public void valueChanged(ListSelectionEvent e) { if (e.getValueIsAdjusting() == false) { JList<?> list = (JList<?>) e.getSource(); String selectedValue = (String) list.getSelectedValue(); String oldValue = textComponent.getText(); textComponent.setText(selectedValue); if (!oldValue.equalsIgnoreCase(selectedValue)) { textComponent.selectAll(); textComponent.requestFocus(); } updateSampleFont(); } } }
public void actionPerformed(ActionEvent ae) { lastActionSelected = Actions.SELECT_ALL; textComponent.selectAll();
} else { textField.selectAll(); JOptionPane.showMessageDialog(this, "Sorry, \"" + typedText + "\" "
ta.insert(pad, ta.getCaretPosition()); else if (choice == selectI) ta.selectAll(); else if (e.getSource() == statusI)
@Override public void focusGained(FocusEvent arg0) { jtc.selectAll(); } @Override
@Override public void actionPerformed (ActionEvent e) { getComponent ().selectAll (); } };
public void actionPerformed(ActionEvent e) { txt.selectAll(); } });
class SelectAll extends TextAction { public SelectAll() { super("Select All"); } public void actionPerformed(ActionEvent e) { JTextComponent component = getFocusedComponent(); component.selectAll(); } }
public void focusGained(FocusEvent e) { Object o = e.getSource(); if (o instanceof JTextComponent) { ((JTextComponent)o).selectAll(); } }
private class MyFocusListener extends FocusAdapter { @Override public void focusGained(FocusEvent fEvt) { JTextComponent component = (JTextComponent) fEvt.getSource(); component.selectAll(); } }
@Override public void focusGained(FocusEvent e) { ((JTextComponent) e.getComponent()).selectAll(); } };
public void refreshUrlHistory() { repositoryPanel.urlComboBox.setModel( new DefaultComboBoxModel(createPresetComboEntries())); urlComboEditor.selectAll(); }
/** * Selects all the text when a field gains the focus. * * @param e the focus event. */ public void focusGained(final FocusEvent e) { if (e.getSource() instanceof JTextComponent) { final JTextComponent tex = (JTextComponent) e.getSource(); tex.selectAll(); } }
/** * Selects all the text when a field gains the focus. * * @param e the focus event. */ public void focusGained(final FocusEvent e) { if (e.getSource() instanceof JTextComponent) { final JTextComponent tex = (JTextComponent) e.getSource(); tex.selectAll(); } }
public void focusInputField(final boolean selectAll) { if (values.isEnabled()) { values.requestFocus(); final Component editorComponent = values.getEditor().getEditorComponent(); if (selectAll && editorComponent instanceof JTextComponent) { ((JTextComponent) editorComponent).selectAll(); } return; } }