diff --git a/src/main/java/userprofilebuilder/view/MainViewer.java b/src/main/java/userprofilebuilder/view/MainViewer.java index e394fc2..c8c511a 100644 --- a/src/main/java/userprofilebuilder/view/MainViewer.java +++ b/src/main/java/userprofilebuilder/view/MainViewer.java @@ -43,7 +43,7 @@ public class MainViewer { ActionListener EditListener = e -> { 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); + DialogueBox(JR.getText(), JR, row, Pname); }; JEdit.addActionListener(EditListener); @@ -55,7 +55,7 @@ public class MainViewer { } - public void DialogueBox(String JRtext, JRadioButton JR, int row){ + public void DialogueBox(String JRtext, JRadioButton JR, int row, String Pname){ JTextField JT = new JTextField(JRtext); @@ -79,10 +79,10 @@ public class MainViewer { if (choice == JOptionPane.OK_OPTION) { - System.out.println("OK option pressed and set text to: " + JT.getText() + " for row :" + row); + System.out.println("OK option pressed and set text to: " + JT.getText() + " for row :" + row + "\n- in Tab: " + Pname); JR.setText(JT.getText()); } else if (choice == JOptionPane.CANCEL_OPTION) { - System.out.println("Cancel option pressed."); + System.out.println("Cancel option pressed." + "\n- in Tab: " + Pname); dialog.dispose(); } }