فهرست منبع

changing default sizing

tarfeef101 6 سال پیش
والد
کامیت
700bf5bac5
2فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 2 0
      assignments/a2/src/main/java/Controls.java
  2. 2 1
      assignments/a2/src/main/java/Menubar.java

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

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