SWING question... 2006-06-16 - By Jeroen Wenting
Back > > I know this is not the exactly list to ask for a SWING question, so if > someone is using / or used SWING please I've a very common > issue. I need to > disable a component (a button specifically) and enable it when some > parameters arise (a checkbox is selected or many and so on), > so if these > components are deselected, the button cames disabled > too...that's all...very > simple, but SWING is a little bit complicated sometimes. > > Thanks in advance... >
Depending on the control you're disabling/enabling, you need to call either setEnabled() or setEditable(). Do this in the event handler where the action is taken (for example in the actionlistener for a button or the changelistener for a checkbox).
=========================================================================== To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) and include in the body of the message "help".
|
|