I want to create a windows appliation in java using Swing in Netbeans. I want to create the student maintenance details, with Mysql as backend. I dont know how to load the frames in single form. Example, if the user give user name and password in the text box and then click the login button, it will load the next frame in same form like web application. If the user click the forgot password button it will load the forget password frame in the same form. Any one can reply this with sample code detaily. Please!

4 Years
Discussion Span
Last Post by stultuske

and thinking like that, you never will find it:
what you are trying to do is not "loading different frames in a form"
a frame is the actual screen. a form would be part of it, placed in another component.

what you try to do is change between panels in one frame.


You could use the Card Layout for this. Basically, you add JPanels to a container, and call the show() method on CardLayout object to specify which panel to display.


other option: you use a null layout, and just add the panels containing your contents to your frame, and use the setVisible method.
there are always different ways to solve an issue.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.