Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to Navigate from one form to another in Swing

 
Tarun Oohri
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Posts: 52632
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Surely the submit button should call methods to validate the entries, and then set all the text in the text fields to "".
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All GUI should have only one JFrame instance. For getting user input, providing feedback, use dialogs. For changing content use a card layout
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!