示例#1
0
 public static void main(String[] args) {
   int face =
       DieFaceChooser.getRedDieFace(
           new JFrame(),
           "Boom!",
           "You have the ability to control the RED die.  Choose a result:",
           null);
   System.out.println("Choose " + face);
   System.exit(0);
 }
示例#2
0
 public static int getRedDieFace(JFrame parent, String title, String message, String table) {
   Die die = new Die(50, 12, Color.red, Color.white);
   DieFaceChooser chooser = new DieFaceChooser(parent, title, message, die, table);
   chooser.setVisible(true);
   return chooser.getChosenFace();
 }