• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Combo box focus problem

 
Abhijeet Roy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All
I have an editable JCombobox item on my GUI. I have a JLabel for the combo box. The label has shortcut key. But in Windows, the shortcut key does not bring focus to the combo box. If I make the combo box un-ediatble, the shortcut key works. Any ideas on how I can make it work with an editable combo box, in Windows. Here is part of the code...
private JComboBox jCmbMachines = new JComboBox();
private JLabel jLblServer = new JLabel();
jLblServer.setLabelFor(jCmbMachines);
jLblServer.setDisplayedMnemonic(KeyEvent.VK_E);
jCmbMachines.setEditable(true);
Thanks!
-Roy
 
VIJAY Yadlapati
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. When JCombobox is editable, focus first goes to the ScrollButton.
 
VIJAY Yadlapati
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes when ComboBox is editable, focus first goes to Combo-Button.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic