aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Some observations regarding Containers. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Some observations regarding Containers." Watch "Some observations regarding Containers." New topic
Author

Some observations regarding Containers.

Trupti Samel
Greenhorn

Joined: May 15, 2001
Posts: 24
Hello Ranchers,
Some Observations :
1. Container can be added to a container.
2. Panel can be added to a container, Similarly container can be added to a panel.
3. Container can be added to any Panel,Window,Frame, Dialog.
4. Panel can be added to Container,window, frame,Dialog.
5. Window,Frame,Dialog cannot be added to themselves eg .Window to window or frame to window.
6. Window ,Frame ,Dialog cannot be added between themselves ed.Frame to window or window to a frame .

7. Window,Frame,Dialog cannot be added to a container.
Am I right? Do add if anything is remaining in this list.Please do correct me if anything is missing.
Regards,
Trupti.
Paul Anilprem
Enthuware Software Support
Ranch Hand

Joined: Sep 23, 2000
Posts: 3335
    
    8
Actually, You do not need to remember such long list. And in fact, I would advise against understanding this stuff through this kind of a list.
There are only 2 simple rules:
1. Any Component except a Window (ie. Frame, Dialog) can be added to any Container.
2. Every Container is a Component. (Because Container extends Component!)
In almost all of the cases, the name of the class is a clear indicator whether you can add stuff to it or not. For. eg. it doesn't make sense to add components to a Button or say List or TextArea! But it does make sense to add components to Panel, ScrollPane etc.

Note: MenuBar is not a Component. It is a MenuComponent and can be added only to a Frame.
HTH,
Paul.
------------------
SCJP2, SCWCD Resources, Free Question A Day, Mock Exam Results and More!
www.jdiscuss.com
Get Certified, Guaranteed!
JQPlus - For SCJP2
JWebPlus - For SCWCD
JDevPlus - For SCJD


Enthuware - Best Mock Exams and Questions for Oracle/Sun Java Certifications
Quality Guaranteed - Pass or Full Refund!
Trupti Samel
Greenhorn

Joined: May 15, 2001
Posts: 24
Thanks for showing me the correct way.
Regards,
Trupti.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Some observations regarding Containers.