W1R5 – 'User Name' Tabbed Pane for your 'Name' Edit Panel
-- 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.
This commit is contained in:
1 parent
0bd73df134
commit
ba1d168998
1 file changed
+1
-2
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user