• Post Reply Bookmark Topic Watch Topic
  • New Topic

JComboBox and IllegalArgumentException

 
Mu Lan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Unfortuantly, our application has to use JDK1.1.8 and Swing 1.0.3. I have two JComboBoxes on my frame. After clicking on one of them, the popup menu opens up, but when I click on the other one, the first one's popup does not close, and causes a java.lang.IllegalArgumentException. These comboboxes can not be editable.
I have tried to add FocusListener to the comboboxes, but had not luck of even getting the FocusListener to receive any event.
I'd really appreciated if any one could tell me the work around to this.
Thanks in advance!
-Mu Lan
 
Ashwin Desai
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Could you post the code for better understanding ?
Ashwin.
 
mick barry
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like there may be a problem in one of your listeners. These are called from the event dispatch thread so if an error occurs in these it'll screw up Swing's behaviour.
But w/out seeing your code it's hard to know exactly what the problem is.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!