Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Delete a panel inside a panel

Reply
Thread Tools

Delete a panel inside a panel

 
 
HS1
Guest
Posts: n/a
 
      12-07-2004
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????

Thank you for your help
SH1


 
Reply With Quote
 
 
 
 
Niels Dybdahl
Guest
Posts: n/a
 
      12-07-2004
> 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


Why is it not a good design ? I think it is reasonable for an object to have
a reference to whatever it is going to work on.

Niels Dybdahl


 
Reply With Quote
 
 
 
 
Babu Kalakrishnan
Guest
Posts: n/a
 
      12-07-2004
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
 
Reply With Quote
 
HS1
Guest
Posts: n/a
 
      12-07-2004
Thank you
That is what I want
SH1
"Babu Kalakrishnan" <> wrote in message
news:...
> 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing Java Control Panel in START menu->Control Panel: Diff javacpl.cpl and javacpl.exe? Robin Wenger Java 0 08-18-2011 06:38 AM
Why is there no "Java Control Panel" for J2EE v5upd14 ? Reinstall Java Control Panel possible? Ulf Meinhardt Java 0 07-07-2009 08:38 AM
Swing, JTabbedPane/Panel/Panel JC Java 1 08-09-2006 09:44 PM
Delete a panel inside a panel (2) HS1 Java 4 12-08-2004 02:48 AM
Email From Forms with asp:panel.(s) Only one panel works? Harry ASP .Net 3 11-10-2003 03:13 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57