Swing is a toolkit for creating a graphical user interface (GUI) in the Java programming language. It is part of the Java Foundation Classes (JFC) library.
How Swing works
Unlike other graphical program interfaces (hereafter APIs), Swing works on a single thread model. This single thread is responsible for both the GUI