how to use jdialog code example Example: java swing dialog box JOptionPane.showMessageDialog(null, "java is fun");