update contents of joptionpane code example Example: java joptionpane JOptionPane.showMessageDialog(frame, "Eggs are not supposed to be green.");