• Post Reply Bookmark Topic Watch Topic
  • New Topic

Applet  RSS feed

 
Arun Maalik
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear sir
would any body tell me what is contaner, how many types of contaner, can one contaner may contane another contaner. I get confuse about contaner, is panel is a contaner or componenet?
 
Muhammad Saifuddin
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

generic term for a graphical element that has subcomponents: Windows, Panels, Frames and Dialog boxes are all types of Containers.

The term container also refers to any class that holds or organises other objects such as trees, bags and Vectors. Though Java folk usually call those collections to avoid confusion.

A Component can belong to at most one Container at a time. To move a Component between Containers, you must first remove it from the old one then add it to the new one. Similarly you may add a Component to a Container only once, unless you remove it first. You can simulate the effect of a Component moving between Containers by having two Components and keeping only one visible at a time.

Swing uses the same AWT Container class.

Container (Java 2 Platform SE.50)
http://mindprod.com/jgloss/container.html

Regards,
SAif uddin
[ July 02, 2006: Message edited by: saif uddin ]
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The javadocs are perfect for answering this kind of question, because for a given class (or interface) they list all classes that extend (or implement) it.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No one actually answered your questions!

A panel is both a Container and a Component; this is because Container is a subclass of Component, so all Containers are Components.

This also means that yes, Containers can contain other Containers, since a Container can hold any kind of Component.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!