• Post Reply Bookmark Topic Watch Topic
  • New Topic

what is top-level window ?  RSS feed

 
mark stone
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 ?
 
Valentin Crettaz
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 ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!