aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to Navigate from one form to another in Swing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to Navigate from one form to another in Swing" Watch "How to Navigate from one form to another in Swing" New topic
Author

How to Navigate from one form to another in Swing

Tarun Oohri
Ranch Hand

Joined: Feb 20, 2013
Posts: 176
Hello Everyone
I am trying to navigate from one form to another. Lets say, on clicking the submit button of the first form...another form should replace in that JFrame.
Till now what i am getting is .. on the click of submit button a new window is appears containing the next form.
Thanks in Advance!!!
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38851
    
  23
Surely the submit button should call methods to validate the entries, and then set all the text in the text fields to "".
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10376
    
    8

All GUI should have only one JFrame instance. For getting user input, providing feedback, use dialogs. For changing content use a card layout


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to Navigate from one form to another in Swing