Lab JOptionPane
import javax.swing.JOptionPane;
public class text
{
public static void main(String arg[])
{
String myString=JOptionPane.showInputDialog("Enter a number: ");
int myNumber = Integer.parseInt(myString);
System.out.println("The number is "+ myNumber);
System.exit(0);
}
}
0 Comments:
張貼留言
<< Home