Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JComboBox disabling not Successfull

 
mithun gooty
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not able to disable the JComboBox successfully. The JComboBox looks disabled, i mean on a mouse click there is no change in the state of the JComboBox, but when i press space-bar the list drops down and i am able to make a selection.

This looks like a bug in the JComboBox implementation itself. How can i get around the implementation and disable the JComboBox successfully?

Thank you.
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you show us your code?
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't reproduce your problem.

After I call setEnable(false) on any JComboBox, not only does it not respond to mouse clicks, but I can't get it to accept focus via any keypress. This is as it should be.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic