• Post Reply Bookmark Topic Watch Topic
  • New Topic

swings  RSS feed

 
Samarth Barthwal
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody,

In Core Java2,Horstmann says the following statement about the swings.Can anybody please elaborate this statement.

" The JFrame is one of the few Swing components that is not painted on a canvas. Thus, the decorations (buttons, title bar, icons, and so on) are drawn by the user's windowing system, not by Swing.
"

Also he mentions that AWT is known as SWT in Eclipse.Is there any difference between the two?
 
Jeff Albertson
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Samarth Barthwal:
Hello everybody,

In Core Java2,Horstmann says the following statement about the swings.Can anybody please elaborate this statement.

" The JFrame is one of the few Swing components that is not painted on a canvas. Thus, the decorations (buttons, title bar, icons, and so on) are drawn by the user's windowing system, not by Swing.
"

Also he mentions that AWT is known as SWT in Eclipse.Is there any difference between the two?


1. That statement about JFrame is not completely correct. Take a look at the the two frames created by this:

Method setDefaultLookAndFeelDecorated is "just providing a hint", but you will probably see two different title bars. The first is drawn by your OS and the second by Swing.

2. SWT is not AWT. It is a separate API, but its approach is closer to AWT's that to Swing because it lets the native OS provide the widgets rather than giving Java the task, as Swing does.

3. Why do some posters refer to Swing as Swings? Who started that?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!