I've got a desktop application with a JFrame holding a JPanel depicting all sorts of lines and circles.
I can click on the JPanel and call forth all kinds of functionality with my own MyMouseListener,
however instead of just leftClick and rightClick,
I'd like to do Ctrl + LeftClick or 'A' + RightClick to expand functionality.
MyMouseListener works just fine. However MyKeyListener takes no notice of when I use the keyboard.
JPanel is a JComponent, so why doesnt it react to keyboard usage?
Am I on the wrong track?
Please have a look at this thread from last week, where somebody else had a similar problem. If you follow the tutorials link in my first post, it tells you about key listeners, and says something about the Component having to be focusable.
That may be your problem.