Results 1 to 4 of 4
  1. #1
    MrZalib is offline Member
    Join Date
    May 2011
    Posts
    2
    Rep Power
    0

    Default Switching between GUI's

    Heyo I have a simple problem that i'm not sure how to implement.

    So I have a basic menu GUI with three radio buttons and then a regular JButton. What it's supposed to do is the user clicks on which option they want and when they click the button it will take them to another GUI while closing the original menu so they can do what they want. Problem is I'm not sure exactly how to go about doing this. I have the GUI call and can bring up the option easy enough but I can't close the original menu. If you'd like to see what I have so far I can post it for you. Thanks in advance. :D

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

    Default

    It sounds as if you want to change views on a single GUI application such as swapping the JPanel that hold the menu buttons for another JPanel that holds the main GUI. If so, check out CardLayout which can help make this easier. If you think this could work for you, please have a look at the tutorial: How to use CardLayout

  3. #3
    MrZalib is offline Member
    Join Date
    May 2011
    Posts
    2
    Rep Power
    0

    Default

    Oh my goodness that I think will do it! Thank you!

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

    Default

    You're welcome, best of luck, and welcome to the Java-Forums! :)

Similar Threads

  1. Help with my Program...GUI'S
    By university123 in forum New To Java
    Replies: 1
    Last Post: 10-18-2010, 02:41 AM
  2. GUI's
    By lopder1 in forum New To Java
    Replies: 2
    Last Post: 11-12-2009, 02:33 AM
  3. GUI's
    By ngc0202 in forum New To Java
    Replies: 7
    Last Post: 07-26-2009, 04:38 AM
  4. GUI's
    By diggitydoggz in forum New To Java
    Replies: 2
    Last Post: 12-22-2008, 10:19 PM
  5. Creating GUI's for simulators.
    By Modifier in forum New To Java
    Replies: 3
    Last Post: 11-20-2008, 01:35 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
  •