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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JComboBox and FocusListener" Watch "JComboBox and FocusListener" New topic
Author

JComboBox and FocusListener

Sakti Singh
Greenhorn

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: http://aspose.com/file-tools
 
subject: JComboBox and FocusListener