I have to listen CTRL key event on panel... can any one send sample code......
posted 12 years ago
You need to add a KeyListener to your JPanel. Then you want to deal with either keyPressed or keyReleased events, not keyTyped events (since the Control key is an action key that produces no character). Here is a short example: