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!

Recommended Answers

All 3 Replies

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.