Not sure if this has been asked before, it’s a bit difficult to explain.
I have 2 classes, Class A and Class B
Class A creates an instance of Class B (which is a dialog box using JDialog).
The user is then asked for text input (stored in a String variable).
How do I tell Class A that the user has now updated the variable and get a copy of it?
Using Java Swing btw,
Thanks
T
If the dialog is modal, then the code is blocked until the dialog is closed:
If the dialog is not modal, then you need to make it call a callback method when the validation happens. This is what MyFrame would contain
and in MyDialog: