/** This method sets up the window and displays it. */
 private void setupFrame() {
   JFrame window = new JFrame("Dungeon of Dooom");
   window.setIconImage(Toolkit.getDefaultToolkit().getImage("graphics/icon.png"));
   window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
   populateFrame(window.getContentPane());
   window.pack();
   window.setLocationByPlatform(true);
   window.setVisible(true);
   Dimension windowSize = new Dimension(608, 606);
   window.setSize(windowSize);
   window.setResizable(false);
 }
Example #2
0
  private static void show() {
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.pack();
    frame.setLocationByPlatform(true);
    frame.setVisible(true);
    try {

    } catch (Exception e) {
      // TODO: handle exception
      System.out.println(e.getMessage());
    }
  }
 private static void show() {
   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
   frame.pack();
   frame.setLocationByPlatform(true);
   frame.setVisible(true);
 }