Public Methods | |
| void | focusGained (FocusEvent e) |
| void | focusLost (FocusEvent e) |
This FocusListener can be used for that porpose.
|
|
00024 {
00025 //System.out.println("Focus gained"+ e.getComponent());
00026 if(e.getComponent() instanceof JTextField)
00027 ((JTextField)(e.getComponent())).selectAll();
00028 }
|
|
|
00031 {
00032 //System.out.println("Focus lost"+ e.getComponent());
00033 if(e.getComponent() instanceof JTextField)
00034 ((JTextField)(e.getComponent())).select(0,0);
00035 }
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001