Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-12-2008, 08:34 PM
Member
 
Join Date: Dec 2007
Posts: 14
kbyrne is on a distinguished road
Adding and removing panels dynamically
Hi,

Apologies if this has already been answered, I looked back a few pages and didn't see anything on the topic.

I'm developing a system, in which the initial page allows a user to log on with username and password leading them to another screen. There are many ways to do this, i believe:

1. Set current JFrame to Invisible and create a new one
2. Set the current panel with login details to invisible and set the desired swing components within the panels you want to show to visible.
3. Remove the current panel and add in the necessary panels when logged in.

I'm guessing 3 is the best option but i don't know how to remove and add JPanels as necessary. If the code i have helps, I can upload. If this question has been asked before, please redirect me. Any advise would be helpful.

Thanks
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-12-2008, 09:28 PM
Moderator
 
Join Date: Nov 2007
Posts: 1,657
Java Tip will become famous soon enoughJava Tip will become famous soon enough
Swing containers should have add and remove methods. You already know how to call add..

But for your purpose, it looks like a wizard framework is best option for you. With these frameworks you can create wizards similar to installation wizard of programs.

Check this document for further details:

java.net: Using the Wizard API
__________________
Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
to our beloved Java Forums! (closes on July 27, 2008)
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
images, panels and applets jamesfrize Java Applets 3 03-20-2008 05:35 PM
Buttons to show new panels Lehane_9 AWT / Swing 1 03-06-2008 05:22 PM
Working with Labels on Panels. vargihate AWT / Swing 2 01-04-2008 05:09 AM
JMenu calling another Forms/Panels plodos New To Java 2 12-10-2007 09:02 AM
Need a tutorial for Studying about Panels ramachandran New To Java 1 10-25-2007 10:05 AM


All times are GMT +3. The time now is 07:25 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org