• Post Reply Bookmark Topic Watch Topic
  • New Topic

JWindow and JFrame

 
Pawanpreet Singh
Ranch Hand
Posts: 264
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everybody,

What is the main difference between JWindow and JPanel?
 
Campbell Ritchie
Marshal
Posts: 52580
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JWindow is a top-level container, but without any embellishments like minimis/maximise buttons. It can be used straight against the desktop, but you usually use JFrame instead.

The JPanel is a rather featureless space which has to go inside something else eg a JWindow, JFrame, JScrollPane, or even another JPanel. You can use the JPanel either to add other components inside, or as a blank space for drawing on with a Graphics object. You cannot use JPanel against the desktop.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!