From 25cb72aafce468f517c9777daece0bbb071bd196 Mon Sep 17 00:00:00 2001 From: mudabbir-ahmad Date: Tue, 4 Feb 2025 18:03:42 +0000 Subject: [PATCH] =?UTF-8?q?W2R2=20=E2=80=93Bring=20up=20a=20Dialog=20Box?= =?UTF-8?q?=20--=20passed=20on=20JRadioButton=20text=20as=20well.=20Tempor?= =?UTF-8?q?arily=20renamed=20radio=20buttons=20to=20easily=20distinguish?= =?UTF-8?q?=20between=20them...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../userprofilebuilder/view/MainViewer.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/main/java/userprofilebuilder/view/MainViewer.java b/src/main/java/userprofilebuilder/view/MainViewer.java index 6922e4a..4839dfb 100644 --- a/src/main/java/userprofilebuilder/view/MainViewer.java +++ b/src/main/java/userprofilebuilder/view/MainViewer.java @@ -24,7 +24,13 @@ public class MainViewer { int row = count+1; - String name = "Name"; + //String name = "Name"; + + // Temporary row distinguishing rename + + String name = "Row " + row + " Name"; + + // end of temporary row rename 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"); @@ -39,7 +45,8 @@ public class MainViewer { ActionListener buttonListener = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - System.out.println("Edit Button clicked for Row: " + row + "with Radio Button Text as: " + JR.getText()); + System.out.println("Edit Button clicked for Row: " + row + " with Radio Button Text as: " + JR.getText()); + DialogueBox(JR.getText()); } }; @@ -48,8 +55,10 @@ public class MainViewer { } - public void DialogueBox(){ - + public void DialogueBox(String JRtext){ + JOptionPane pane = new JOptionPane(JRtext); + JDialog dialog = pane.createDialog("Change Name to what?"); + dialog.show(); }