• 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
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

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)
 
Anything worth doing well is worth doing poorly first. Just look at this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic