From 9c8bf7f7b8d331c309c8fc2f09a6d1467481bb93 Mon Sep 17 00:00:00 2001 From: mudabbir-ahmad Date: Tue, 4 Feb 2025 19:59:26 +0000 Subject: [PATCH] =?UTF-8?q?W2R3=20=E2=80=93=20Update=20the=20JRadioButton?= =?UTF-8?q?=20name=20--=20improved=20debugging=20in=20console=20to=20make?= =?UTF-8?q?=20it=20more=20human=20readable.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/userprofilebuilder/view/MainViewer.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/userprofilebuilder/view/MainViewer.java b/src/main/java/userprofilebuilder/view/MainViewer.java index ea4a55c..e394fc2 100644 --- a/src/main/java/userprofilebuilder/view/MainViewer.java +++ b/src/main/java/userprofilebuilder/view/MainViewer.java @@ -19,7 +19,7 @@ public class MainViewer { 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. + private void CreateRow(int count, JPanel jp, String Pname) // Function to create a row // holds all the data of a row in the grid layout below. { int row = count+1; @@ -42,13 +42,13 @@ public class MainViewer { System.out.println("Row number: "+ row + " Has been created!"); ActionListener EditListener = e -> { - System.out.println("Edit Button clicked for Row: " + row + "\n- with Radio Button Text as: " + JR.getText()); + System.out.println("Edit Button clicked for Row: " + row + "\n- with Radio Button Text as: " + JR.getText() + "\n- For tab: " + Pname); DialogueBox(JR.getText(), JR, row); }; JEdit.addActionListener(EditListener); ActionListener RadioListener = e -> { - System.out.println("Radio Button toggled for Row: " + row + "\n- with Radio Button Text as: " + JR.getText() + "\n- With state of radio button changed to: " + JR.isSelected()); + System.out.println("Radio Button toggled for Row: " + row + "\n- with Radio Button Text as: " + JR.getText() + "\n- With state of radio button changed to: " + JR.isSelected() + "\n- For tab: " + Pname); }; JR.addActionListener(RadioListener); @@ -102,7 +102,7 @@ public class MainViewer { for (int i=0; i