Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with editable combo box!Pls Help me  RSS feed

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.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!