Browse Source

changing default sizing

tarfeef101 6 năm trước cách đây
mục cha
commit
700bf5bac5

+ 2 - 0
assignments/a2/src/main/java/Controls.java

@@ -14,6 +14,8 @@ public class Controls extends JPanel implements Observer
     // changes.
     // changes.
     this.model = model;
     this.model = model;
     this.setPreferredSize(new Dimension(300, 30));
     this.setPreferredSize(new Dimension(300, 30));
+    this.setPreferredSize(new Dimension(1280,75));
+		this.setMinimumSize(new Dimension(320, 75));
     model.addObserver(this);
     model.addObserver(this);
   }
   }
 
 

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

@@ -13,7 +13,8 @@ public class Menubar extends JPanel implements Observer
     // Hook up this observer so that it will be notified when the model
     // Hook up this observer so that it will be notified when the model
     // changes.
     // changes.
     this.model = model;
     this.model = model;
-    this.setPreferredSize(new Dimension(300, 50));
+    this.setPreferredSize(new Dimension(1280, 50));
+		this.setMinimumSize(new Dimension(320, 50));
     model.addObserver(this);
     model.addObserver(this);
   }
   }