PDA

View Full Version : Hiding ContentPanel



micgala
17 Jun 2009, 7:01 AM
Hi.

I have a child ContentPanel which is inserted into a parent.
How do I hide (or remove) this child from its parent?

Right now, the parent is BorderLayout, so I know I can call hide in the BorderLayout...
But I do not want to be dependent on the parent's layout... since I, as a child, want to remove myself from my parent... this should be as simple as:

child.removeFromParent()

But this is not working.

Does someone have an idea on how to do this?

Tks for helping,
Michel.

micgala
22 Jun 2009, 1:03 AM
Is there really no way of removing the panel from its parent without having a reference to the parent itself in case of BorderLayout?