//Play several games of Craps import javax.swing.*; public class PlayCraps { public static void main(String[] args) { do { CrapsGame game = new CrapsGame(); System.out.println( game.getRecord() ); System.out.println(); } while ( playingAgain() ); } //Prompt the user to play again or quit playing private static boolean playingAgain() { int option = JOptionPane.showConfirmDialog(null, "Click YES To Play a Craps Game. NO to Quit", "SHOOTING CRAPS", JOptionPane.YES_NO_OPTION ); return option == JOptionPane.YES_OPTION ; } }