File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes JComboBox disabling not Successfull Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JComboBox disabling not Successfull" Watch "JComboBox disabling not Successfull" New topic

JComboBox disabling not Successfull

mithun gooty
Ranch Hand

Joined: Mar 14, 2006
Posts: 33
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

Joined: Sep 11, 2006
Posts: 959

Can you show us your code?

SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
pete stein

Joined: Feb 23, 2007
Posts: 1561
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.
I agree. Here's the link:
subject: JComboBox disabling not Successfull
jQuery in Action, 3rd edition