• Post Reply Bookmark Topic Watch Topic
  • New Topic

Adding twice, what happens?  RSS feed

 
Micah Wedemeyer
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens if you add the same component to a container more than once? I assume it will display properly, but what about calls to remove(Component)? Is the behavior of remove(Component) implementation specific, or is there some general expected behavior between all the different core LayoutManagers?
Micah
 
Vinod Venugopal
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all, if you add the same component twice in the same container, it will display only the last component added. Also when remove(Component) is called, the last of the components that was added will be removed, in this case the component which was added second time.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!