Is there a way to make a jbutton unclickable in java?
Is there a way to make a jbutton unclickable in java?
hi i have a grid of buttons. when clicked a letter appears on the button. is it possible to make the button no loger clickable after it has been clicked and the character is shown? preferably the char is still visible after it is unclickable thx
Re: Is there a way to make a jbutton unclickable in java?
- Call setEnabled(false) on the button, or
- Remove the ActionListener from the button, or
- Leave the ActionListener in place but give it logic to allow it to not do any actions if desired, perhaps controlled by a boolen.
- Or many other ways....
Re: Is there a way to make a jbutton unclickable in java?
Re: Is there a way to make a jbutton unclickable in java?
Quote:
Originally Posted by
DarrylBurke
Original poster, next time, please have the decency to let us know when you cross-post. If you do this a lot without notifying us, there are many who will decide not to help you in the future, and I don't blame them. Who wants to waste time helping if there's a likely chance that an answer has been provided elsewhere. It's simply a matter of being considerate of the free time of others.