Wednesday, September 28, 2011

JOptionPane

import java.util.*;
import javax.swing.JOptionPane;
public class WelcometoJavaDialog{

public static void main(String[] a){
Scanner input=new Scanner(System.in);
String fullname=JOptionPane.showInputDialog("What is your name,in full?");
String nam1=input.next();
String nam2=input.next();

System.out.print("\nhellow  "+nam1+" "+nam2);
System.out.println("-congratuations on write your first "+" java program which features some input!\n\n");

JOptionPane.showMessageDialog(null,"\nhello  "+nam1+" "+nam2+"\n-congratuations on write your first "+"\njava program which features some input!","welcome to java input",JOptionPane.PLAIN_MESSAGE);
}
}

No comments:

Post a Comment