The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
August 2000



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


About setEnabled

Posted by Stoil on October 13, 2000 at 3:10 AM

> I have this JComboBox for which I have to use the method setEnabled(boolean b) many times.

> JComboBox comboBox;
> comboBox.setEnabled(false);
> .
> .
> .
> comboBox.setEnabled(true);
> comboBox.updateUI();
> if(comboBox.isEnabled())
> System.out.println("comboBox Enabled!!!");

> This is what I do with the comboBox and although "comboBox Enabled!!!" gets printed the comboBox UI does not look enabled.

Hi Shakila,
I have such problems too. Try to make true, false, true repeatedly in order to make it setEnabled end also try to put the reverse setEnabled(true/false) in another method.


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us