You'll want to start by looking at the documentation for JOptionPane
, specifically JOptionPane.showMessageDialog
.
Sample usage from the javadoc:
JOptionPane.showMessageDialog(null, "alert", "alert", JOptionPane.ERROR_MESSAGE);
Just write your main method do do this several (ie: four, according to your question) times in a row, replacing the strings "alert" with whatever messages you want.