Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What's the difference btw a Frame and a Window?  RSS feed

 
Femi Alla
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I just found out that I am not quite sure of the advatages (or disadvantages) of making my GUI a frame or window (or the swing equivalents).
Can anyone explain this in clear terms?
Thanks.
 
Femi Alla
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I meant the advantages one has over the other.
Thanks.
 
Laird Nelson
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Briefly (and there's more than just this): A Frame has a MenuBar; a Window does not. A Frame is a specialization of Window. There are no innate advantages or disadvantages to either; it just depends on what you want your application to look like.
Additionally, to create a Window you have to create a Frame as its parent and owner. Frames are the "outermost" component of GUIs (usually).
Hope this helps,
Laird
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!