Hi,
there are two JButtons, Jbutton2 should be enabled when Jbutton1 is clicked, if not clicked Jbutton2 should be grayed out or disabled, how can i accomplish this?
Regards
Sandeep
Printable View
Hi,
there are two JButtons, Jbutton2 should be enabled when Jbutton1 is clicked, if not clicked Jbutton2 should be grayed out or disabled, how can i accomplish this?
Regards
Sandeep
Perhaps the first button should be a JToggleButton rather than a JButton. The second button can be a JButton and can be enabled or disabled via its setEnabled(boolean enabled) method.
For more specific help though, you'll need to post code, best of all an SSCCE
JButton2.setEnabled(true); //false to disable
Hi Fubarable,
Thanks for your reply, i will try doing it, anything i get stuck i catch you back.
Regards
Sandeep
Moved from 'New to Java'. 'sandeep43' please choose an appropriate section of the forums for your questions.
db