This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
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: 189
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: 44524
    
  34
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: 10747
    
    9

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
 
It's not a secret anymore!