Esempio n. 1
0
 public void focusLost(FocusEvent e) {
   Component c = e.getComponent();
   if (c instanceof TextField) ((TextField) c).select(0, 0);
 }
Esempio n. 2
0
 public void focusGained(FocusEvent e) {
   Component c = e.getComponent();
   if (c instanceof TextField) ((TextField) c).selectAll();
 }