Thu Jun 28, 2007 11:14 pm
What is Swing?
---------------------------------------------------------------------
The javax.swing package of classes is used to create GUI (Graphical User Interface) components for applets and applications. Project Swing classes enable programmers to specify a different look and feel for each platform, or a uniform look across all platforms. Swing is the project code name for the lightweight GUI components.
Swing is a large set of components ranging from the very simple, such as labels, to the very complex, such as tables, trees, and styled text documents. Almost all Swing components are derived from a single parent called JComponent, which extends the AWT Container class. Thus, Swing is best described as a layer on top of AWT rather than a replacement for it.
If you compare this with the AWT Component hierarchy you will notice that for each AWT component there is a Swing equivalent with prefix "J". The only exception to this is the AWT Canvas class, for which JComponent, JLabel, or JPanel can be used as a replacement.You will also notice many Swing classes with no AWT counterparts.
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.