Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Why my all itemStateChanged() perform twice?  RSS feed

 
Walt Deng
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
now i am changing a awt project to swing,but all itemStateChanged() perform twice,one for deselect and one for select,why?it is no problem in awt.
 
Rene Liebmann
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you mean JComboBox, then you shoult try to take actionPerformed. This sends only one event and only when something happend.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!