By Alvin Alexander. Last updated: September 12, 2014
Quick tip: If you need to display a message dialog in a Java application, you can do so in as little as one line:
JOptionPane.showMessageDialog(jframe, "Hello, world");
If you don’t have a JFrame
available, you can use null
for the first argument. There are many more details and examples in this Java JOptionPane showMessageDialog tutorial.