Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

what is top-level window ?  RSS feed

 
Ranch Hand
Posts: 417
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Class Window is a top-level window
Class Frame is also a top-level window
well what is top-level ?
does this mean that these components or rather containers cannot be stuffed into another container ?
if yes, then why don't they say Top level container ? would that be correct to say ?
 
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

well what is top-level ?
does this mean that these components or rather containers cannot be stuffed into another container ?


Yes. Class container's method addImpl(Component comp,...) throws an IllegalArgumentException("adding a window to a container") in case you try to add a window to a container.


if yes, then why don't they say Top level container ? would that be correct to say ?


Because a container is more general-purpose than a Frame or a Window.
HIH
[ January 22, 2002: Message edited by: Valentin Crettaz ]
 
This. Exactly this. This is what my therapist has been talking about. And now with a tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!