()
| 62 | } |
| 63 | |
| 64 | public void init() |
| 65 | { |
| 66 | setTitle("Graphwar"); |
| 67 | setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
| 68 | getContentPane().setPreferredSize(new Dimension(Constants.WIDTH,Constants.HEIGHT)); |
| 69 | pack(); |
| 70 | setLocationRelativeTo(null); |
| 71 | setVisible(true); |
| 72 | setResizable(false); |
| 73 | |
| 74 | |
| 75 | try |
| 76 | { |
| 77 | gameData = new GameData(this); |
| 78 | globalClient = new GlobalClient(this); |
| 79 | graphUI = new GraphUI(this); |
| 80 | } |
| 81 | catch (InterruptedException e) |
| 82 | { |
| 83 | e.printStackTrace(); |
| 84 | } |
| 85 | catch (Exception e) |
| 86 | { |
| 87 | e.printStackTrace(); |
| 88 | } |
| 89 | |
| 90 | this.add(graphUI); |
| 91 | |
| 92 | graphUI.setScreen(Constants.MAIN_MENU_SCREEN); |
| 93 | |
| 94 | this.validate(); |
| 95 | this.repaint(); |
| 96 | } |
| 97 | |
| 98 | public void start() |
| 99 | { |
no test coverage detected