Input using JOptionPane
From CompSciWiki
JOptionPane gives you the ability to create dialogs. A dialog is a window that pops up and either displays a message or requests input from the user. This section will show you how to use JOptionPane to get input from a user.