I have a little big problem doing this:
From a JFrame, I call a JInternalFrame, so, I want to call a method of the JF from the JIF. The problem is, if I make a new instance of this JF, the changes are not applied, because it's not the same original instance.
I'm doing a login in this JIF, if the credentials are right, the menu in the JF must change, otherwise, no change must be applied.
I read in other sites on Internet that "Invoke" is the solution, but "Invoke" apparently works only with new instances. Is there another solution?
Thanks everybody for his help!
I've solved the problem!
Generally to call all my JInternalFrames I used a general global declaration:
But to solve my problem, I declared a new constructor using directly the class of my JInternalFrame:
Before the call, I declared a public global constructor in the Log In JIF:
With that, using the new constructor in my JF, I could able to access to all the public declarations in my JIF. Then, I made the call using something like this:
After that, in my JIF, when the credentials were right, I've used this:
And that's all, after the results all I can said was "I really need to relax more and think better the things".
Thanks again!!!