Java Creating a Message Dialog Box How we take a input from the message box JOptionPane easy input, output with dialog boxes Creating a MessageBox / Message Dialog in Java
public class JOptionPaneExample {
public static void main(String[] args) {
String userInput;
//Input Message Box
userInput = JOptionPane.showInputDialog(null,"Enter a Name?");
//Output Message Box
JOptionPane.showMessageDialog(null, "Your Name is "+userInput);
}
}
public class JOptionPaneExample {
public static void main(String[] args) {
String userInput;
//Input Message Box
userInput = JOptionPane.showInputDialog(null,"Enter a Name?");
//Output Message Box
JOptionPane.showMessageDialog(null, "Your Name is "+userInput);
}
}
0 comments:
Post a Comment