This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
No, an IllegalArgumentException will be thrown if you try to add any type of Window to a Container. You should try to write the code before asking this kind of question, you would have found the answer very quickly. The code is as simple as this:
Never forget that practicing is the key to your success.
Hi sunita, Some more tips.... Basically a container is a component that can accommodate other components and containers. This will provide support for building complex hierarchical GUIs. The abstract class Container has two sub classes 1.Panel and 2.Window. Sub class of panel is Applet and That of Window class is Frame and Dialog. In general there are two types of containers, one can exist by it�s own and the other can not. One can exist by its own is known as a "Top Level Window". Example Window and its sub classes (Frame and Dialog). And for the other type Example is Frame class. A Top Level container (Window) can not be incorporated in to other type of containers (This is the answer to your question!), But it can contain other "non Top Level container", example a frame can contain Panel, but not in the other way!. In that case it will throw an IllegalArgumentException (as Mr.Valentin Crettaz mentioned) Hope this will help you Johnson
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com