posted 18 years ago
In order to make the user feel covenient to use the UI, I try to make the VK_ENTER as the hot key of ok button.
I've tried the three way to do it.
add the key listener to JFrame - doesn't work
overide processKeyEvent method --- doesn't work
add key listener to every focusable component -- work, but cumbersome. I want to know whether the 3rd one is the only solution? and how to fire the action? do I need to let it invoke the same method of ButtonListener? I wonder there's something like the onclick method...
SCJP 1.4<br />SCWCD 1.3<br />SCJD<br />SCBCD<br />IBM Xml Cert in progress