Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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 Murach's Java Servlets and JSP this week in the Servlets 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: 172
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: 37953
    
  22
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: 10167
    
    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!]
 
Don't get me started about those stupid light bulbs.
 
subject: How to Navigate from one form to another in Swing
 
Similar Threads
Need help in linking two applets(Navigation)
Opening Next Page in New Window
Submit button
from is getting submitted when 'Refresh' button is clicked
form is getting submitted when 'Refresh' button on the browser is clicked.