User clicks on the button and exit the current class and enter into a new class.
How to do this ?
Your question doesn't really make sense to me, but I have one comment: drop the NetBeans visual designer -- it's not a beginners' tool, despite what Oracle would have you believe -- and learn to code Swing GUIs by hand. This tutorial (omitting the second topic in the trail) will get you started.
You might get better help if you describe what exactly you want to do -- not how you hope to do it.
There are no new questions, but there may be new answers.
Gustavo Hackum wrote:Alright.
Well, I have an class initial that contains buttons.
For example: Click here!
When the user press the button Click here, will take him to another class, leaving the current class.
Well, yes, whenever you call a method, you temporarily leave the execution of the calling method's code. When the called method completes, we pick up where we left off in the caller. If the called method is in another class, the same thing happens.
I have no idea what question you're trying to ask, however.