HS1 wrote:
> Hello all
>
> I have some sub-panels inside a main panel. The main panel is
> VerticalFlowLayout. Inside each subpanel, I have button "Delete". What I
> want is that when I click the "Delete" in a panel, this sub-panel will be
> disposed and the main panel will be updated.
> I do not want to have a variable main panel for each sub-panel as it is not
> a good design
> Is there a good way to do this. Do I have to create event handlers????
>
If the subpanel is directly added to the main panel, calling getParent()
on the subpanel should give you a reference to it.
BK
|