what's the code to create a message box the some text in it and an ok button.
Printable View
what's the code to create a message box the some text in it and an ok button.
Code:JOptionPane.showMessageDialog(null, "Your message here", JOptionPane.PLAIN_MESSAGE);
Chris
Info message box:
Toolkit.getDefaultToolkit().beep();
JOptionPane.showMessageDialog(null, "Message" , "Title" ,JOptionPane.INFORMATION_MESSAGE);
Error Message box:
Toolkit.getDefaultToolkit().beep();
JOptionPane.showMessageDialog(null, "Message" , "Title" ,JOptionPane.ERROR_MESSAGE);