This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JComboBox and FocusListener

 
Sakti Singh
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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");
}
});

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic