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

JComboBox and actionEvents  RSS feed

 
Jennifer Sohl
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. I have a JComboBox that contains countries. Any time the country is changed to other than the United States, a JDialog box comes up warning the user address information will not be verified.
That works OK.
My problem is, whenever I retrieve a record from a file that is other than the US, the message still comes up. I don't want it to in this case.
I tried using a mouseListener on the JComboBox instead of actionListener, but that did not work.
How do I prevent the message from coming up when I'm retrieving a record?
Thanks in advance!
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There may be a more sophisticated way, but I'm thinking that a boolean check would work...



-Nate
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!