From f2ea5de2da3a8d4cb59df4c0e03573f04d2b1184 Mon Sep 17 00:00:00 2001 From: mudabbir-ahmad Date: Tue, 4 Feb 2025 19:49:26 +0000 Subject: [PATCH] =?UTF-8?q?W2R3=20=E2=80=93=20Update=20the=20JRadioButton?= =?UTF-8?q?=20name=20-=20updated=20code.=20fixed=20using=20lambda=20for=20?= =?UTF-8?q?action=20listener=20on=20edit=20button=20and=20changed=20jframe?= =?UTF-8?q?=20to=20public=20to=20get=20rid=20of=20warnings.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/userprofilebuilder/view/MainViewer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/userprofilebuilder/view/MainViewer.java b/src/main/java/userprofilebuilder/view/MainViewer.java index acf3bb2..8e387ce 100644 --- a/src/main/java/userprofilebuilder/view/MainViewer.java +++ b/src/main/java/userprofilebuilder/view/MainViewer.java @@ -34,7 +34,7 @@ public class MainViewer { JRadioButton JR = new JRadioButton(name); // temporary use of name as label for JRadioButton - to allow for the use of text being manipulated // changed. JButton JEdit = new JButton("Edit"); JButton JDelete = new JButton("Delete"); - + jp.add(JR); jp.add(JEdit); jp.add(JDelete); @@ -74,9 +74,10 @@ public class MainViewer { if (choice == JOptionPane.OK_OPTION) { - System.out.println("OK option pressed."); + System.out.println("OK option pressed and set text to: " + JT.getText()); JR.setText(JT.getText()); } else if (choice == JOptionPane.CANCEL_OPTION) { + System.out.println("Cancel option pressed."); dialog.dispose(); }