Browse Source

making default window a better size

tarfeef101 6 years ago
parent
commit
f6f8b6d4b6

+ 2 - 1
assignments/a2/src/main/java/Main.java

@@ -25,7 +25,8 @@ public class Main
 		model.setControlColour(Color.red);
 		
 		// Setup the frame to do frame things
-		window.setPreferredSize(new Dimension(300,300));
+		window.setPreferredSize(new Dimension(1280,720));
+		window.setMinimumSize(new Dimension(320, 180));
 		window.pack();
 		window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 		window.setVisible(true);

+ 2 - 2
assignments/a2/src/main/java/Sidepane.java

@@ -15,7 +15,7 @@ public class Sidepane extends JPanel implements Observer
     // Hook up this observer so that it will be notified when the model
     // changes.
     this.model = model;
-    this.setPreferredSize(new Dimension(100, 300));
+    this.setPreferredSize(new Dimension(280, 720));
     colours = new Colours();
     this.add(colours);
     model.addObserver(this);
@@ -46,7 +46,7 @@ class Colours extends JPanel
   public Colours()
   {
     this.setLayout(new GridLayout(0, 2));
-    this.setPreferredSize(new Dimension(100, 225));
+    this.setPreferredSize(new Dimension(280, 600));
     red = new JButton("Red");
     green = new JButton("Green");
     blue = new JButton("Blue");