Results 1 to 3 of 3
Like Tree3Likes
  • 2 Post By KevinWorkman
  • 1 Post By Zigster

Thread: Switching between "pages"?

  1. #1
    Zigster is offline Member
    Join Date
    Apr 2012
    Posts
    74
    Rep Power
    0

    Default Switching between "pages"?

    I've been looking at tutorials and the API docs for Swing, but I'm still unsure how this works.

    Does Swing have "pages" like websites? So you can like... store different layouts in pages, and then change to them when you click a Jbutton?

    Or how do I set it up so the interface changes to a different one (from a group, say I have a "page" for shops, and then a "page" for inventory, character stats, etc) by clicking a Jbutton (or from some other Event, or when a variable reaches a certain value or something)?

    Thanks!

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,958
    Rep Power
    8

    Default Re: Switching between "pages"?

    Sounds like a job for CardLayout!
    Fubarable and Zigster like this.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Zigster is offline Member
    Join Date
    Apr 2012
    Posts
    74
    Rep Power
    0

    Default Re: Switching between "pages"?

    Thanks! I did look at CardLayout but I thought it had to use drop down menu to switch between them for some reason. Anyway, Cheers! That's what I wanted.
    Fubarable likes this.

Similar Threads

  1. How to have multiple "Pages" in an Applet?
    By poorbrain in forum Java Applets
    Replies: 5
    Last Post: 01-08-2013, 11:45 AM
  2. Replies: 1
    Last Post: 02-01-2012, 08:37 PM
  3. Replies: 2
    Last Post: 01-24-2009, 06:56 PM
  4. Replies: 1
    Last Post: 10-20-2008, 07: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
  •