• 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 ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!