Swing is a GUI widget toolkit for Java. Before Swing, Abstract Windows Toolkit (AWT) was used to create new GUIs, but it was heavy-weight and platform dependent. Unlike AWT, Swing is written entirely in Java and is therefore platform independent. Swing is a light-weight toolkit (it does not require a native OS object to implement its functionality) that benefits from being easily customizable.
Swing is often used to create graphical user interface components such as buttons and scrollbars for websites. Additionally, Swing helpfully allows coders to form time-efficient patterns in that they
can write a tool panel only once but then use it in different ways and in different places.