java swing alert dialog code example
Example 1: java swing alert window
JOptionPane.showMessageDialog(yourFrame,
"WARNING.",
"Warning",
JOptionPane.WARNING_MESSAGE);
Example 2: java swing dialog box
JOptionPane.showMessageDialog(null, "java is fun");