Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //código del botón de ejemplo
- Date date = new Date();
- this.lblresultado.setText(date.toString());
- DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
- JOptionPane.showMessageDialog(rootPane, "Hola " + this.txtNombre.getText()+ "\nHoy es: "+dateFormat.format(date));
- int edad;
- edad=Integer.parseInt(this.txtEdad.getText());
- if (edad>18){JOptionPane.showMessageDialog(rootPane,"Puede votar, elija sabiamente");}
- else{JOptionPane.showMessageDialog(rootPane,"Espere a las proximas elecciones");}
- //video: https://youtu.be/Wd4BpWhdMOg
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement