So here is my code in a summary, a button click from another class sends it here where it launches the new window.
How do I get the contents of stringFirst to display on the new window? Note: Any classes/textfields/buttons used in this code are in a seperate class that I don't is necessary to solve this issue.
posted 3 years ago
if the original window (JFrame ) is DataApplication, it won't work the way you're trying it.
1) the new window should be a JDialog - very rare to have 2 JFrames running around.
2) in the constructor of the dialog, pass a reference of the DataApplication instance to the dialog
3) set the various label texts to those from the instance passed