Is the swing components light?

When I read about Swing, they say it's light weight components. So, I just searched Google Swing and found that this means that Swing is independent of its peers. Is that why they are called "lungs" ? I mean light weight, I thought maybe Swing components take up less memory than AWT components. Is that not so?

+5
source share
3 answers

Swing is considered lightweight because it is fully implemented in Java without invoking its own operating system for drawing graphical user interface components.

AWT (Abstract Window Toolkit) , on the other hand, is a heavyweight toolkit because it simply calls up the operating system to create its own GUI components.

The evolution of the Swing Paint system from Painting in AWT and Swing in the article explains the difference between light and heavy:

When the original AWT API was developed for JDK 1.0, only heavyweight components existed (heavyweight means that the component has its own opaque native window). This allowed AWT to rely heavily on the paint subsystem in every native platform.

[...]

JDK 1.1 ( "" , ), AWT Java-.

Swing Java, , , Java.

Swing , , JTable JList, , , AWT, .

+11

- , . , - . JDK.

+8

, : .

. , , Swing - , , , Oracle ... ( . JavaFX ).

0

All Articles