From ba1d1689982ee2f7b1d147f43498beec7c1dfb9c Mon Sep 17 00:00:00 2001 From: k2320390 Date: Mon, 3 Feb 2025 12:44:36 +0000 Subject: [PATCH] =?UTF-8?q?W1R5=20=E2=80=93=20'User=20Name'=20Tabbed=20Pan?= =?UTF-8?q?e=20for=20your=20'Name'=20Edit=20Panel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- changed my for loop for creating rows, changed the 1st param in the grid layout method to 0 instead of using a as i recently learnt that 0 makes the grid layout dynamic for that specific param. --- src/main/java/userprofilebuilder/view/MainViewer.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/userprofilebuilder/view/MainViewer.java b/src/main/java/userprofilebuilder/view/MainViewer.java index bdd2064..0a0516b 100644 --- a/src/main/java/userprofilebuilder/view/MainViewer.java +++ b/src/main/java/userprofilebuilder/view/MainViewer.java @@ -16,7 +16,6 @@ import javax.swing.JFrame; public class MainViewer { private JFrame viewer; - public int a = 3; // this represents a value that is to declare how many rows are to be made private void CreateRow(int count, JPanel jp) // Function to create a row // holds all the data of a row in the grid layout below. @@ -44,7 +43,7 @@ public class MainViewer { JPanel page = new JPanel(); - page.setLayout(new GridLayout(a,3)); // Because i cant remember the orientation of grid layout params it's (x,y) AKA rows , columns + page.setLayout(new GridLayout(0,3)); // Because i cant remember the orientation of grid layout params it's (x,y) AKA rows , columns JT.addTab(Pname, page);