---
title: "Difference between Swing and Awt?"  
description: "Difference between Swing and Awt?"  
author: "Rajesh Goswami"  
published: 2010-10-19  
updated: 2023-05-03  
canonical: https://www.mindstick.com/interview/47/difference-between-swing-and-awt  
category: "java"  
tags: ["java"]  
reading_time: 3 minutes  

---

# Difference between Swing and Awt?

The main difference between AWT and Swing components are the AWT components use native methods whereas Swing components use the methods that are writtern in Java.Hence AWT components are Heavy Weight components and Swing components are Light Weight components. \

## Answers

### Answer by Aryan Kumar

Swing and AWT (Abstract Window Toolkit) are two different user interface (UI) frameworks used for creating graphical user interfaces (GUI) in Java. Although both frameworks are used for creating GUI applications, there are some significant differences between the two.

1. **Architecture:** AWT is a part of the core Java API and is implemented using the platform's native GUI components. Swing is built entirely in Java and provides a set of GUI components that are platform-independent.
2. **Look and feel:** AWT components use the look and feel of the underlying platform, which can result in differences in appearance and behavior between platforms. Swing components have a consistent look and feel across all platforms, which makes it easier to create portable applications.
3. **Performance:** AWT components are faster than Swing components because they are implemented using the native GUI components of the platform. Swing components are slower because they are implemented entirely in Java and rely on the Java Virtual Machine (JVM) to render the components.
4. **Features:** Swing provides a richer set of GUI components than AWT, including advanced components like tables, trees, and lists. Swing also provides support for features like drag and drop, internationalization, and accessibility that are not available in AWT.
5. **Customizability:** Swing components can be customized more easily than AWT components because they are implemented entirely in Java. Swing provides a robust set of APIs for customizing the look and feel of the components, which is not available in AWT.

In summary, AWT is a simpler, faster, and more lightweight UI toolkit that uses the native GUI components of the platform, while Swing is a more advanced, flexible, and portable UI toolkit that provides a rich set of GUI components and features.

### Answer by Krishnapriya Rajeev

The major differences between Swing and AWT are listed as follows:

| AWT components are platform-dependent. | Swing components are platform-independent. |
| --- | --- |
| They are heavyweight. | They are lightweight. |
| It doesn't support a pluggable look and feel. | It supports a pluggable look and feel. |
| It doesn't follow MVC(Model View Controller). | It follows MVC. |
| AWT provides fewer components than Swing. | Swing provides more powerful components like tables, lists, etc. |
| The execution time of AWT is more than Swing. | The execution time of Swing is less than AWT. |

### Answer by Pushpendra Singh

The main difference between AWT and Swing components are the AWT components use native methods whereas Swing components use the methods that are writtern in Java.Hence AWT components are Heavy Weight components and Swing components are Light Weight components. \


---

Original Source: https://www.mindstick.com/interview/47/difference-between-swing-and-awt

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
