This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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");

I agree. Here's the link:
subject: JComboBox and FocusListener
Similar Threads
JTextField Listener
focusListener wont work on JComboBox
JComboBox and FocusListener
FocusListner not working on JMenu
KeyListener working randomly