J
JavaEnquirer
If I add a KeyListener to a frame, capturing key presses and drawing
corresponding lines on a JPanel, everything works fine - I can doodle
to my hearts content. ( The panel has been added to the center of the
frame's borderlayout.)
However, the moment I add a Swing control such as a JButton to another
panel e.g. on the West, my frame level key listener no longer seems to
work even when I attempt to give the frame focus.
Any ideas??
corresponding lines on a JPanel, everything works fine - I can doodle
to my hearts content. ( The panel has been added to the center of the
frame's borderlayout.)
However, the moment I add a Swing control such as a JButton to another
panel e.g. on the West, my frame level key listener no longer seems to
work even when I attempt to give the frame focus.
Any ideas??