koool
koool

Reputation: 15517

Switching from one view to another : Java

I have one .java file in which I have a form for user registration and I have another page on another .java file that should appear (and previous should disappear) when user clicks on next .... could anybody provide me any guidance.

Thanks a lot efforts appreciated

Upvotes: 1

Views: 1686

Answers (4)

mKorbel
mKorbel

Reputation: 109815

very simple by implements Splash Screen logics, you create a JDialog (one .java) and only if everything passed from one .java then shows something from another .java

Upvotes: 1

michael667
michael667

Reputation: 3260

Use a CardLayout

Upvotes: 5

StanislavL
StanislavL

Reputation: 57381

Remove old content from container and add the new content. Then call revalidate() and repaint().

Upvotes: 1

KV Prajapati
KV Prajapati

Reputation: 94625

My guess! you haven't tried setVisible() method.

Upvotes: 2

Related Questions