• 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