• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Why can't u add same panel to frame twice???

 
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried following code...

I am adding the same panel to frame twice. but the o/p shows only one panel. if i uncomment those two commented lines , two,panels get added to frame. i.e p1 gets added to f. Why an't i use the same panel p to get added twice??? However u can add same button (rather any component) twice to the frame? What so special abt frame???
thanx in advance.
Rashmi

(Marilyn added code tags for readability)
[This message has been edited by Marilyn deQueiroz (edited November 21, 2001).]
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Panel p is only one object and can exist as only one. The same stands for any other object (even for buttons). You cannot ask the same object to exist in multiple places simultaneously.
------------------
Cheers,
Manoj
(http://www7.brinkster.com/manoj9/)
 
Ranch Hand
Posts: 898
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is what Manoj implied was that you should to have two instances for them appearing as ...well, two instances
 
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Adding a Component to a Container removes it from the previous Container where it was(if any)
 
permaculture is a more symbiotic relationship with nature so I can be even lazier. Read tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic