Return result from JOptionPane to JFrame
Hi.
I have Frame and button in that Frame. When I click on the button it opens
Dialog. In that Dialog is button. When I click on that button it returns something to the frame (for example draw Rectangle or Oval).
I have tried few times, but it wasn't good :-(
My thinking:
class NewFrame extends JFrame
class NewPanel extends JPanel
in NewPanel I have button.add(ActionListener)
NewDialog extends JDialog
DialogPanel extends JPanel
in DialogPanel there is dialogButton.add(ActionListener)
Problem is how with using mouse clicks on dialogButton to affect the change of NewFrame (for example draw Rectangle in that NewFrame).
Please give me advice.