Swings Introduction

Posted by Kalyan Kurasala  |  No comments

Swing is a collection of set of classes that provides more powerful and flexible GUI components when compared to AWT components. Swing did not exist in the early days of Java. The swing was a solution to the problems present in Java's AWT. The AWT defines basic set of controls, windows, dialog boxes. But it has limited graphical interface. AWT components are heavy weight. i.e., these components are dependent on native operating system. Swing components are light weight i.e., these components are independent of operating system.
Swing was introduced in 1997, included as a part of the Java Foundation Classes (JFC). Swing was initially available with JAVA 1.1 as a seperate library Begining with Java 1.2, Swng was fully integrated into Java.
Swing is built on the top of AWT. Swing also uses the same event handling  mechanism as the AWT. Then we must have a basic knowledge about the AWT and of event handling.
YOU CAN"T BE A GREAT JAVA PROGRAMMER WITHOUT KNOWING THE AWT.
The swng GUI consists of two key items:
  1. Components
  2. Containers
A component is an independent visual control,  such as button, text field and etc.
A container is a special type of component that is designed to hold other components.
Components: Swing components are derived from the JComponent class. This JComponent is inherited from Component and Container in AWT. There are several Swing Components.

Containers: Containers are also Components. JWindow, JPanel, JFrame are the examples for containers. The swing containers are inherited from AWT classes container and components

08:25 Share:
About Kalyan Kurasala

I am a B.Tech Student at Prasiddha College Of Engineering and Technology in Anathavaram.

0 comments:

Get updates in your email box
Complete the form below, and we'll send you the best coupons.

Deliver via FeedBurner
back to top