Ver Mensaje Individual
  #2 (permalink)  
Antiguo 11/04/2010, 11:35
Avatar de drac94
drac94
 
Fecha de Ingreso: mayo-2008
Ubicación: México
Mensajes: 383
Antigüedad: 16 años
Puntos: 5
Respuesta: Mensaje cuando no ingreso Datos en java

import javax.swing.*;
public class Nombre_Clase {
public static void main(String[] args) {
String Nombre = JOptionPane.showInputDialog("Ingrese su Primer Nombre");
If (Nombre==null) {
System.out.println("Usted Cancelo el Programa");
}
else if (Nombre.equals("")){
System.out.println("Usted no ah ingresado nada");
}else{
System.out.println(Nombre);
}
}
}