Topics To Know Before Learning Swings and Events in Java
Prerequisites to learn Swing in Java
Swing is user interface toolkit in Java. Java Swing is a GUI toolkit that allows you to create desktop client applications with rich user interface. If learning Java swings, you must focus on event driven programming methods to have a broader understanding of GUI programming.
What is Java Swing ?
Java Swing 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. Java Swing provides platform independent and lightweight components.
What is AWT (Abstract Windowing Toolkit) ?
Package java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.
The java.awt package is the main package of the AWT, or Abstract Windowing Toolkit. It contains classes for graphics, including the Java 2D graphics capabilities introduced in the Java 2 platform, and also defines the basic graphical user interface (GUI) framework for Java.
The java.awt package provides classes for AWT api such as TextField, Label, TextArea, RadioButton, CheckBox, Choice, List and so on.
What is JFC (Java Foundation Classes) ?
The Java Foundation Classes (JFC) are a set of GUI components which simplify the development of desktop applications.
What are the topics we need to know before learning swings and events in Java?
Before learning swings and events in Java you should have following topics to know.
- You should have a basic understanding of Java programming language.
- You should know how to execute a Java programs.
- You should know java.awt Toolkit
- You should know java.awt.event package for event handling.
What is the Difference between Java AWT and Swing ?
Following are the differences between Java AWT and swing.
|Difference between Java AWT and Swing|
|Java AWT||Java Swing|
|Java AWT components are platform dependent.||Java swing components are platform independent.|
|Java AWT components are heavy weight.||Java Swing components are light weight.|
|Java AWT does not support pluggable look and feel.||Java Swing supports pluggable look and feel.|
What are the topics learning swings in Java?
If you want to learn Java swings you must know the following.
- You should learn javax.swing package.