Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add new mock classes to determine source of problem
  • Loading branch information
dwm10005 committed Apr 21, 2015
1 parent 97fa96d commit 6039988
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
15 changes: 15 additions & 0 deletions src/LinuxTestMain.java
@@ -0,0 +1,15 @@
import javax.swing.JFrame;
import javax.swing.JPanel;


public class LinuxTestMain{

public static void main(String[] args) {
JFrame frame = new JFrame("y u no work on linux");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel container = new JPanel();
container.add(new TestGui());

}

}
8 changes: 5 additions & 3 deletions src/Main.java
Expand Up @@ -32,15 +32,16 @@ public class Main extends JFrame{

JPanel container = new JPanel();
//container.setLayout(new BoxLayout(container, BoxLayout.X_AXIS));
container.setLayout(new BorderLayout(10,10));
//container.setLayout(new BorderLayout(10,10));
MockGui mg = new MockGui(640,640,32, num, nodes);
StatGui sg= new StatGui(0,0);
//sg.setPreferredSize(new Dimension(1, 0)); //this keeps statgui from overlapping mockgui

//container.add(mg);
//container.add(sg);
container.add(mg, BorderLayout.CENTER);
container.add(sg, BorderLayout.PAGE_END);
//container.add(new TestGui());
//container.add(sg);
frame.add(new TestGui());


MapTowerDefense map = new MapTowerDefense(100, num, nodes, mg, sg);
Expand All @@ -49,6 +50,7 @@ public class Main extends JFrame{
sg.setup();

frame.add(container);
frame.pack();
frame.setVisible(true);

map.createMinion(MinionTypes.BASIC);
Expand Down
16 changes: 16 additions & 0 deletions src/TestGui.java
@@ -0,0 +1,16 @@
import java.awt.Color;
import java.awt.LayoutManager;

import javax.swing.JButton;
import javax.swing.JPanel;


public class TestGui extends JPanel {

public TestGui() {
super();
this.setBackground(Color.CYAN);
this.add(new JButton("Press this and nothing will happen"));
}

}

0 comments on commit 6039988

Please sign in to comment.