19th Day @ Apex : SWING

Hi Readers,
In Process of developing my  project i have to also learn a new thing about swing.
This is something similar to AWT.
 But They have their own differences.

Java Swing tutorial is a part of Java Foundation Classes (JFC) that is used to create window-based applications. It is built on the top of AWT (Abstract Windowing Toolkit) API and entirely written in java.

Unlike AWT, Java Swing provides platform-independent and lightweight components.

The javax.swing package provides classes for java swing API such as JButton, JTextField, JTextArea, JRadioButton, JCheckbox, JMenu, JColorChooser etc.

There are many differences between java awt and swing that are given below.


No.Java AWTJava Swing
1)AWT components are platform-dependent.Java swing components are platform-independent.
2)AWT components are heavyweight.Swing components are lightweight.
3)AWT doesn't support pluggable look and feel.Swing supports pluggable look and feel.
4)AWT provides less components than Swing.Swing provides more powerful componentssuch as tables, lists, scrollpanes, colorchooser, tabbedpane etc.
5)AWT doesn't follows MVC(Model View Controller) where model represents data, view represents presentation and controller acts as an interface between model and view.Swing follows MVC.



The hierarchy of java swing API is given below.

hierarchy of javax swing

Comments

Popular posts from this blog

How to add Internet download manager extension in the Chrome browser

A Day in Noida: Learning Begins

Python Deciding factor