Pilot Study of Selective Messagesthis problem is caused by not knowing default button setting of rootPane. -dhouMessage thread: http://forums.sun.com/thread.jspa?forumID=257&threadID=138625Message Description: Message type: author meet a problem with his Button.He wants the button to perform Able/Disable functionWhen he enters return on the panel, the button is invoked.This is because by default, the rootPane chooses a button as a default button.This default button will be invoked whenever a user presses the enter key in the panel.He wants to disable this. -dhouQ&A process: q1-a1-q2-a2-final conclusion (solved)What is the situation of the Q/A?ask and answer one by one, perfect match
What should be the most impartial way of the Q/A?good and clear enoughWith code/not: a code posted by the author; Communication media (code/image/word....):word onlythey also used some code in their text -dhouSwing category:rootpane-Button specificStatus of Code:for explanationOther description:
Advertisement
add this post into Table of Content!
OP wanted to
“I want to remove the selection from the button that has just been clicked (to disable enter clicks),
how do I do?”
Selection Barriers.
Next time please add comment in the 6-barrier post so that I can delete the wrong classification.
[...] http://lilisworking.wordpress.com/2009/08/19/pilot-study-of-jbutton-undo/ Swing design assign every rootpane a default JButton. In this case, OP have to learn how to unregister key binding so as to implement his project. [...]