Well, I’m having this newbie problem right now.
I have 3 JFrames. JFrame1 opens JFrame2; JFrame2 gets the words and then re-opens JFrame1; JFrame1 opens JFrame3 with the words taken in JFrame2.
The problem I’m having is about the creation of JFrame3. I mean, I know how to go from JFrame2 directly to JFrame3 (via constructor, passing by parameters the words I found). What I’m trying to do is taking the words from JFrame2, putting it in JFrame3, but making this last one invisible (this.setVisible(false)). And then, when I go back to JFrame1, and when I click on a button, it redirects me to JFrame3 with the words from JFrame2. Which I think it’d be something like […].setVisible(true).
What I don’t wanna do is to create a new JFrame3() when I click on the button on JFrame1. Because doing so, I’d lose all the things I got in JFrame2. So, basically, I just want to make the JFrame3 visible again. Without having to create a new one and losing all my stuff.
I hope someone can understand what I’m trying to say and can help me somehow.
Thanks in advance, guys. Sorry for the bad English.
By the way, I’m using Netbeans-Java.
1 Answer