Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with editable combo box!Pls Help me

Murali Obla
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks,
I have a problem with the combo box in a JDialog window. The problem is as follows...
1) I have a combo box which is editable followed by 3 text boxes and ok/cancel/apply buttons in it.
2) Whenever an user edits the combo box and after that whatever be the clickevent say clicking ok/apply/cancel or clicking any text boxes within the dialog box, combo box automatically fires an event. So the code in the actionPerformed(or ItemStateChanged) part of the JComboBox gets executed Instead of the actionPerformed part of the ok/apply/cancel buttons..Only in the next click the corresponding code of the button gets executed...In brief..the JComboBox automatically fires an event...
How to overcome this?.I have copied my code below.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic