---
title: "Difference between AWT and Swing"  
description: "Difference between AWT and Swing"  
author: "Rajesh Goswami"  
published: 2010-11-08  
updated: 2023-05-01  
canonical: https://www.mindstick.com/forum/76/difference-between-awt-and-swing  
category: "java"  
tags: ["java"]  
reading_time: 2 minutes  

---

# Difference between AWT and Swing

Most of the [class](https://www.mindstick.com/blog/165/generic-class-in-c-sharp) use in both what is differnece between them?

## Replies

### Reply by Aryan Kumar

AWT (Abstract Window Toolkit) and Swing are two different Java GUI (Graphical User Interface) toolkits used for developing desktop applications. AWT is the older of the two and was introduced with the first version of Java, while Swing was introduced in Java 1.2 and is a newer and more advanced toolkit.

Here are some key differences between AWT and Swing:

1. **Platform Independence:** AWT components use the platform's native peer components, while Swing components are entirely written in Java and are therefore completely platform-independent.
2. **Look and Feel:** AWT components have a native look and feel, while Swing components have a pluggable look and feel, allowing developers to change the appearance of components.
3. **Performance:** AWT components are generally faster than Swing components, but they do not offer as many features and are not as flexible as Swing components.
4. **Component Set:** AWT offers a smaller set of components than Swing, which offers a richer set of components with more functionality.
5. **Customization:** Swing provides more customization options for developers than AWT, allowing developers to create their own components and layouts.
6. **Advanced Features:** Swing offers several advanced features not available in AWT, such as support for drag and drop, better support for accessibility, and better support for internationalization.

In summary, AWT and Swing are two different Java GUI toolkits, with AWT being the older and more basic toolkit, and Swing being the newer and more advanced toolkit. While AWT offers faster performance and a native look and feel, Swing offers a richer set of components, more customization options, and advanced features.

\

### Reply by Anurag Sharma

AWT are heavy-weight componenets. Swings are light-weight components. Hence swing works faster than AWT.\
and many other classes added in swing.


---

Original Source: https://www.mindstick.com/forum/76/difference-between-awt-and-swing

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
