This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Swing Components Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "Swing Components" Watch "Swing Components" New topic
Author

Swing Components

kedar parundekar
Ranch Hand

Joined: May 10, 2006
Posts: 40
How AWT components are differ from swing components?
Jeff Albertson
Ranch Hand

Joined: Sep 16, 2005
Posts: 1780
I suggest you search on "Swing versus AWT"
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Moving to the Swing/AWT forum.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32836
    
    4
Swing components have their own "look-and-feel," which is derived from Java. They make little use of the underlying OS, which is called "lightweight." Some AWT classes (eg Color) don't have a "look-and-feel" as such, and are therefore not duplicated in Swing. Their inheritance varies, but you will usually find a Swing class has a superclass in AWt somewhere. Those classes in Swing which correspond to AWT classes have the same name with a J prefix.

AWT components are older than the corresponding Swing classes, and they make heavy use of the OS, and are called "heavyweight." They do not have a "look-and-feel" of their own, but "borrow" a "look-and-feel" from the OS.

So: A Swing app using "metal" "look-and-feel" will run on Windows and on a Mac, and ought to look the same.
An AWT app will run on Windows and Mac, but will look different.

CR
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Swing Components
 
Similar Threads
Are swing components thread safe?
A hard question
populating an array via the user
Wrap Text in a JButton
LightWightComponents