Results 1 to 4 of 4

Thread: Card Layout

  1. #1
    Gilbee is offline Member
    Join Date
    Jan 2009
    Posts
    3
    Rep Power
    0

    Default Card Layout

    Does anyone know how to set up a card layout in netbeans? I understand how to make a panel into a card layout and how to add panels to that panel, but how do you switch from one card to another using a button? Thanks.
    Last edited by Gilbee; 01-19-2009 at 06:38 PM. Reason: Figured it out.

  2. #2
    Gilbee is offline Member
    Join Date
    Jan 2009
    Posts
    3
    Rep Power
    0

    Default

    Figured it out.

  3. #3
    Captaincola is offline Member
    Join Date
    Mar 2009
    Posts
    1
    Rep Power
    0

    Default

    how did you get it working?!

  4. #4
    Gilbee is offline Member
    Join Date
    Jan 2009
    Posts
    3
    Rep Power
    0

    Default

    Under properties on your card, you should see "Card Name." I named my second card "NEXT". Then under the button, I inserted the code:

    CardLayout cl = (CardLayout) (mainPanel.getLayout());
    cl.show(mainPanel, "NEXT");

    Hope this helps.

Similar Threads

  1. Can we access sim card from computer
    By rajasekharpv in forum Sun Java Wireless Toolkit
    Replies: 3
    Last Post: 09-03-2009, 04:22 PM
  2. A Online Card Game
    By GonzaloP in forum Networking
    Replies: 0
    Last Post: 12-28-2008, 07:37 PM
  3. Credit Card Validator
    By bluegti02 in forum New To Java
    Replies: 2
    Last Post: 06-17-2008, 07:09 AM
  4. Card program , need help thanks.
    By carlos123 in forum New To Java
    Replies: 2
    Last Post: 12-31-2007, 08:23 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
  •