KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a JCombobox in my code. I have added the FocusLost event . But it didn't fired anyway. I have tried lots of time but didn't find solution. jcbItemType.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { jcbItemTypeFocusLost(evt); } }); private void jcbItemTypeFocusLost(java.awt.event.FocusEvent evt) { // TODO add your handling code here: System.out.println("name=" + ((Component) evt.getSource()).getName()); System.out.println("index=" + jcbItemType.getSelectedIndex()); } But nothing is printed in console. Please suggest me what I am doing wrong.
Tags (comma-separated)
Save Edits
Cancel