The JOptionPane class provides a graphical interface for prompting for small amounts of input or for displaying messages or relatively small amount of output.