Results 1 to 6 of 6
  1. #1
    DavidG24 is offline Member
    Join Date
    Apr 2009
    Posts
    49
    Rep Power
    0

    Default Multiple Panels in JFrame or JPanel

    hey Guys,

    I have to develop a simple GUI for an assignment and basically it involves a simple Graphics display centered in the Form (which I have done so far), and multiple Panels that have different inputs that I want to overlap one another once each has been used.

    I.e. if I have four panels different panels that I want to be able to rotate between in the Bottom Right Hand Side of the Panel, how do I go about this?

    That was probably a bit too ambiguous, basically I have any opening Panel, the user passes attributes and hits the 'OK' Button, once this event has occurred I want the original panel to 'disappear' and be replaced with a new Panel and so forth, how do I go about this?

    I have designed each of the panels, but can't get them to 'overlap' so to speak,

    Any help would be greatly appreciated, this has been driving me insane!!

    Thanks in advance,

    David

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    look at using a CardLayout

  3. #3
    DavidG24 is offline Member
    Join Date
    Apr 2009
    Posts
    49
    Rep Power
    0

    Default

    Hey Fuburable, thanks for the quick response, is there a way to use CardLayout without having the tab or dropdown box?

    Thanks again,

    David

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Have you looked at the tutorial that is linked in my post? It will answer this and other questions that will come up. My suggestion: give it a try. If it doesn't work, or you have a problem with your code, then come on back, post your code, and we'll probably be able to help you. Good luck.
    Last edited by Fubarable; 05-16-2009 at 04:11 AM.

  5. #5
    DavidG24 is offline Member
    Join Date
    Apr 2009
    Posts
    49
    Rep Power
    0

    Default

    [SOLVED]

    Hey mate, thanks for your help - got it working !!

    Thanks again,

    David

  6. #6
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. How to add JFrame inside JPanel
    By niteshwar.bhardwaj in forum Java 2D
    Replies: 8
    Last Post: 12-13-2009, 08:41 PM
  2. problems with JPanel and JFrame
    By v1nsai in forum New To Java
    Replies: 13
    Last Post: 04-08-2009, 07:49 PM
  3. scroll a Jpanel in a JFrame
    By nidhirastogi in forum SWT / JFace
    Replies: 1
    Last Post: 09-07-2008, 03:42 AM
  4. Replies: 6
    Last Post: 07-28-2008, 06:04 PM
  5. Replies: 7
    Last Post: 07-09-2008, 12:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •