Guest User

Untitled

a guest
Jan 19th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. nick = new JTextField("nick", 5);
  2. add(nick);
  3. nick.addFocusListener(new FocusListener() {
  4. public void focusGained(FocusEvent e) {
  5. nick.setText("");
  6.  
  7. }
  8.  
  9. public void focusLost(FocusEvent e) {
  10. // nothing
  11. }
  12. });
  13.  
  14. JLabel texto = new JLabel("CLIENTE");
  15. add(texto);
  16.  
  17. ip = new JTextField("Introduce la IP del destinatario", 16);
  18. add(ip);
  19. ip.addFocusListener(new FocusListener() {
  20. public void focusGained(FocusEvent e) {
  21. ip.setText("");
  22.  
  23. }
  24.  
  25. public void focusLost(FocusEvent e) {
  26. // nothing
  27. }
  28. });
Add Comment
Please, Sign In to add comment