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
();
2008-06-04
How to minimize and restore Java Swing JFrame
1. Minimize -> use this method
frame
.setState (
Frame
.ICONIFIED );
2. Restore -> use this method
frame
.setState (
Frame
.NORMAL );
frame
is instance of JFrame
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)