chewpichai
2008-06-23
Add KeyListener On Swing JPanel
Use code like this
JFrame
frame = new J
Frame()
;
JPanel
pnl = new
JPanel()
;
pnl.addKeyListener(
keyListener
);
pnl.
setFocusable
(true);
frame.add(pnl);
frame.pack();
pnl.drawing.
requestFocus
();
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment