Adding/Removing Panels

Discussion in 'Java' started by christopher_board@yahoo.co.uk, Aug 17, 2006.

  1. Guest

    I am trying to add and remove panel in Java. I have a main application
    screen with a panel added to the contentPane. This works without any
    problems. When I click a button in the added panel it should remove
    this panel and add a different one. How do I do this. Any help would be
    apreciated. Thank you
     
    , Aug 17, 2006
    #1
    1. Advertising

  2. Ed Guest

    skrev:

    > I am trying to add and remove panel in Java. I have a main application
    > screen with a panel added to the contentPane. This works without any
    > problems. When I click a button in the added panel it should remove
    > this panel and add a different one. How do I do this. Any help would be
    > apreciated. Thank you


    You've to remove the old panel, add the new one, and re-draw the
    container.

    See drawPanel() at:
    http://www.edmundkirwan.com/servlet/fractal/cs1/code/package29.html#drawPanel

    Which calls pokerFrame.setTablePanel() and pokerFrame.redraw().

    Bit of a heavy-handed approach, I suppose ...

    ..ed

    --
    www.EdmundKirwan.com - Home of The Fractal Class Composition.

    Download Fractality, free Java code analyzer:
    www.EdmundKirwan.com/servlet/fractal/frac-page130.html
     
    Ed, Aug 18, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. CGuy
    Replies:
    0
    Views:
    485
  2. Patrick
    Replies:
    5
    Views:
    1,447
    Patrick
    Jan 13, 2004
  3. Steve Jones
    Replies:
    0
    Views:
    571
    Steve Jones
    Feb 18, 2004
  4. Replies:
    0
    Views:
    344
  5. Chris  Chiasson
    Replies:
    6
    Views:
    624
    Richard Tobin
    Nov 14, 2006
Loading...

Share This Page