• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

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)
 
You’ll find me in my office. I’ll probably be drinking. And reading this tiny ad.
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic