public void run() { try { Thread.sleep(1500); Game.setClosing(false); System.out.println("time up"); } catch (InterruptedException e) { e.printStackTrace(); } }
/** * @author Redomar * @version Alpha 1.8.3 */ public Game() { context = InputContext.getInstance(); setMinimumSize(new Dimension(WIDTH * SCALE, HEIGHT * SCALE)); setMaximumSize(new Dimension(WIDTH * SCALE, HEIGHT * SCALE)); setPreferredSize(new Dimension(WIDTH * SCALE, HEIGHT * SCALE)); setFrame(new JFrame(NAME)); getFrame().setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); getFrame().setLayout(new BorderLayout()); getFrame().add(this, BorderLayout.CENTER); getFrame().pack(); getFrame().setResizable(false); getFrame().setLocationRelativeTo(null); getFrame().setVisible(true); requestFocus(); setDevMode(false); setClosing(false); }