I have tried a few different ways to to highlight the text in a jcombobox when it receives focus but none have work. Any have a code example that could help?
Some examples I have tried:
private void fromComboBoxFocusFocusGained(FocusEvent event) {
JTextField field = (JTextField)fromComboBox.getEditor().getEditorComponent();
field.selectAll();
}
private void fromComboBoxFocusFocusGained(FocusEvent event) {
fromComboBox.getEditor().selectAll();
}