aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JComboBox and FocusListener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JComboBox and FocusListener" Watch "JComboBox and FocusListener" New topic

JComboBox and FocusListener

Sakti Singh

Joined: Dec 13, 2000
Posts: 16
Hi Friends ,
I have a problem with firing focus event when a JComboBox Got/Lost Focus.I will appreciate If any body will solve my problem.

Thanks & Regards
Sakti Singh
NB: The code is as below
//focus listener for the JComboBox
jComboBox.addFocusListener(new java.awt.event.FocusAdapter()
public void focusLost(FocusEvent fe)
//print on console
System.out.println("Focus lost");
public void focusGained(FocusEvent e)
//Print on console
System.out.println("Focus Gained");

jQuery in Action, 2nd edition
subject: JComboBox and FocusListener
Similar Threads
JComboBox and FocusListener
JTextField Listener
FocusListner not working on JMenu
focusListener wont work on JComboBox
KeyListener working randomly