File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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
It's not a secret anymore!