This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Containers  RSS feed

 
Tommy Hicks
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I saw this on a different discussion group and I was wondering if someone would explain the answer to me.
What can be added to a container?
Select all that apply.
a) Frame
b) Component
c) Container
d) MenuComponent
e) Panel
Can a Container be added to a container?
Would the answers be a, b, d, e
Thanks for your help.
 
paul wheaton
Trailboss
Posts: 22574
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would say that the answer is b, c and e.
A container can be added to a container. But a MenuComponent is not a Component. And I think Frame is something that is not kept within a container.
 
simon
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't agree with you Paul. Frame can be added to container as frame itself is container
 
paul wheaton
Trailboss
Posts: 22574
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Frame is a container, but Frame is also a window. How do you add a window to a container?
Have you tried it?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!