Results 1 to 2 of 2
  1. #1
    scheffetz is offline Member
    Join Date
    Mar 2011
    Posts
    13
    Rep Power
    0

    Default Question about cardlayout

    I have looked at many cardlayout tutorials and examples and I have not been able to figure this situation out.

    I am trying to create a GUI where the user can switch between multiple screens.

    For example, there would be the welcome screen with a few buttons like Start Game, Instructions, Quit, etc....

    When the user clicks on a button, it would bring them to the new screen.

    Every example of cardlayout I have seen, there is usually a small panel of buttons that are constant. Is this a requirement for using cardlayout? Or can you have different buttons on your different panels for the navigation?

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

    Default

    Quote Originally Posted by scheffetz View Post
    Every example of cardlayout I have seen, there is usually a small panel of buttons that are constant. Is this a requirement for using cardlayout?
    No.


    Or can you have different buttons on your different panels for the navigation?
    You can have whatever you'd like, but understand that the card components will be forced to be the same size. The best way to test this out is to create a small test program to see if you can do this. Then if it doesn't work, post your code here.
    Last edited by Fubarable; 04-02-2011 at 09:11 PM.

Similar Threads

  1. Using a FlowLayout on top of a CardLayout
    By snieuw in forum New To Java
    Replies: 1
    Last Post: 11-08-2010, 07:03 PM
  2. Help with CardLayout
    By Kyle227 in forum New To Java
    Replies: 4
    Last Post: 05-28-2010, 02:03 AM
  3. cardlayout question
    By newbie123 in forum New To Java
    Replies: 1
    Last Post: 04-06-2010, 12:53 AM
  4. Regarding CardLayout
    By adeeb in forum AWT / Swing
    Replies: 1
    Last Post: 06-07-2008, 08:52 PM
  5. Using previous with CardLayout
    By uncopywritable in forum New To Java
    Replies: 2
    Last Post: 08-05-2007, 10:43 PM

Posting Permissions

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