1 package debugger;
2
3 import debugger.gui.MainFrame;
4
5 import java.awt.*;
6
7
14
15 public class JapeDebugger {
16 private static final boolean DEBUG = false;
17
18 static MainFrame frame;
19
20 public JapeDebugger() {
21 JapeDebugger.main(null);
22 }
23
24 public static void main(String[] args) {
25 if (DEBUG)
26 System.out.println("Before creating MainFrame");
27
28 frame = new MainFrame();
29 Toolkit toolkit = java.awt.Toolkit.getDefaultToolkit();
30 int screenWidth = toolkit.getScreenSize().width;
31 int screenHeight = toolkit.getScreenSize().height;
32
33 frame.setSize(screenWidth - 100, screenHeight - 100);
34
35 int framePositionX = (screenWidth - frame.getWidth()) / 2;
36 int framePositionY = (screenHeight - frame.getHeight()) / 2;
37
38 frame.setLocation(framePositionX, framePositionY);
39 frame.setVisible(true);
40 }
41
42 public static MainFrame getMainFrame() {
43 return frame;
44 }
45 }