Bladeren bron

top bar looks a lot better now

tsdedhar 6 jaren geleden
bovenliggende
commit
c86a22e2dd

BIN
assignments/a3/.gradle/4.7/fileHashes/fileHashes.bin


BIN
assignments/a3/.gradle/4.7/fileHashes/fileHashes.lock


BIN
assignments/a3/.gradle/4.7/taskHistory/taskHistory.bin


BIN
assignments/a3/.gradle/4.7/taskHistory/taskHistory.lock


BIN
assignments/a3/.gradle/buildOutputCleanup/buildOutputCleanup.lock


BIN
assignments/a3/build/classes/java/main/Controls.class


+ 17 - 10
assignments/a3/src/main/java/Controls.java

@@ -223,7 +223,7 @@ public class Controls extends JPanel implements Observer, Serializable
     this.customlistener = new customListener();
     this.superlistener = new superListener();
     this.setBackground(Color.white);
-    this.setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
+    this.setLayout(new BorderLayout(0 , 0));
     this.setPreferredSize(new Dimension(1280,75));
     this.setMinimumSize(new Dimension(320, 75));
     
@@ -317,15 +317,22 @@ public class Controls extends JPanel implements Observer, Serializable
     star4.setSelected(false);
     star5.setSelected(false);
 
-    this.add(grid);
-    this.add(list);
-    this.add(new JLabel("Fotag!"));
-    this.add(star1);
-    this.add(star2);
-    this.add(star3);
-    this.add(star4);
-    this.add(star5);
-    this.add(fileButton);
+
+    JPanel tempPanel = new JPanel();
+    tempPanel.setLayout(new BoxLayout(tempPanel, BoxLayout.X_AXIS));
+    tempPanel.add(grid);
+    tempPanel.add(list);
+    this.add(tempPanel, BorderLayout.LINE_START);
+    this.add(new JLabel("Fotag!", JLabel.CENTER), BorderLayout.CENTER);
+    JPanel tempPanel2 = new JPanel();
+    tempPanel2.setLayout(new BoxLayout(tempPanel2, BoxLayout.X_AXIS));
+    tempPanel2.add(star1);
+    tempPanel2.add(star2);
+    tempPanel2.add(star3);
+    tempPanel2.add(star4);
+    tempPanel2.add(star5);
+    tempPanel2.add(fileButton);
+    this.add(tempPanel2, BorderLayout.LINE_END);
     model.addObserver(this);
   }