The Abstract Window Toolkit (AWT) is Java's original platform-independent windowing, graphics, and user-interface widget toolkit.


Swing is the primary user-interface toolkit in Java and is shipped with the standard Java SDK


Quality Example
More useful

"As far as when awt may be more useful than swing -"

from question "What is the difference between Swing and AWT?"


"Are there any cases where awt is more useful advised to use than swing or vice-versa"

from question "What is the difference between Swing and AWT?"

Functionality advanced better

Quality Example

"Swing has newer and better api s than awt"

from question "JTextField respond to key event AFTER the text is updated"

"Yes swing has newer and better api s than awt"

from question "Two JPanels, requesting focus and Keyboard input"

"You can read all over the web that awt is old and deprecated and swing is old but newer than awt and should be preferred over awt whenever possible"

from question "When to use AWT along with Swing and when not?"

Far better

"Swing is far better than the obsolete awt library"

from question "How do I add padding with Container?"


"Swing is better and few people remember how to use awt components"

from question "What is the difference between JApplet and Applet, and which should I use?"

"Swing or javafx would be better than awt"

from question "How to use custom axis type? (Java)"

Far better then

"Swing is far better then awt and should be educated to people who is writing gui-based java for the first time"

from question "Java calculator decimal point"


"Its was said that awt is faster than swing as it uses the platform component but due the arrival of faster processor etc .."

from question "When you use Frame or JFrame in Java?"

Much better performance

"Consider using swing which has much better performance over the old heavyweight awt"

from question "Beginner Java Program-- cannot get key pressed to work"


"Well swing is richer in terms of out-of-the-box components than awt"

from question "Do I have to learn AWT before learning Swing?"


"In swing has more features than the awt components"

from question "If Swing has more features to design a form. Then what is the use of AWT in java?"

"It has functionality the same as a canvas but swing is more advanced and has better features than awt"

from question "Using Java AWT components"


Quality Example
Library much more portable

"The swing library is much more portable than the awt library"

from question "Creating a Frame with MenuBar - Size not recognized by pack(), menubar is being cutoff"

Much greater power

"In general avoid awt for swing which has much greater power and flexibility although it too is showing its age just less so than awt"

from question "Java.awt: Second TextArea is not shown"

Less memory

"I mean by light weight i thought maybe the swing components occupy less memory than the awt components"

from question "Swing components are light-weight?"


"Note first there is no combobox item in awt there is jcombobox in swing which is better to use than choice of awt"

from question "Adding an Action listener to a JComboBox"

More efficient

"Generally swing is more efficient and advanced than awt"

from question "Java Style About JFrame and DefaultCloseOperation"

More comfortable

"I know you re thinking why did i use awt instead of swing but at the moment i am more comfortable with awt"

from question "Add a scrollbar/scrollpane to frame in AWT"

Worse technology

"Alternate way is to use awt - which is an older and worse technology than swing and in that case you can t use flowlayout - it puts all the components into one row"

from question "I can't rearrange text in JAVA"

More experience

"Awt is really out of date people have more experience with swing no days and even javafx"

from question "Control is not going through if statement"

More onerous

"Use swing follow the threading rules which are hardly likely to be more onerous than awt and enjoy"

from question "Must all methods in AWT classes, i.e. non-Swing ones, be called in the EDT?"

Approach closer

"The awt approach seems closer to bare metal but since jdk 6 brought a lot of improvements in swing rendering pipeline i would go the swing java2d approach"

from question "How to effectively render video in Java (AWT??)"


"Performance swing components are generally slower and buggier than awt due to both the fact that they are pure java and to video issues on various platforms"

from question "Is Java Swing still in use?"

Much more

"Use a swing gui not an awt gui since swing is much more powerful and flexible than awt"

from question "Paint ArrayList of Shape Objects to Frame"


"Swing has more or less deprecated awt so you should extend jframe instead of frame"

from question "Java - Game of Life - Trouble with displaying graphics"

"Swing is relatively similar to awt apart from the fact that swing has more capabilities awt is probably the simplest form to start out with and has most if not all of the tools to complete your project hope this helps"

from question "Simple Java Game Graphical Interface"

"Swing will save your more time than awt as all the code of components of swing are purely written in java whereas of awt code of components are written in native language that is other than java thus compilation time of awt is more than swing"

from question "Clearing screen vs drawing on top?"

Library easier

"I find that the swing library is easier to use than awt although you do still have to use awt for listeners"

from question "Creating a Frame with MenuBar - Size not recognized by pack(), menubar is being cutoff"

Back to Home
Data comes from Stack Exchange with CC-BY-SA-3.0