Presentation 1
Presentation 1
Swing provides many new features; two of its popular features are:
• Lightweight components
• Pluggable look and feel
Lightweight Components
•The pluggable look arid feel feature allows us to tailor the look and
feel of the application.
• We can even switch to different look and feel at runtime.
• Swing has the capability to support several look and feels, but at
present.
•As the look and feel of components is controlled by Swing rather than
by operating system, the feel of components can also be changed.
•The look and feel of a component can be separated form the logic of
the component. Thus, it is possible to “plug in” a new look and feel for
any given component without affecting the rest of the code.
Hierarchy of Java Swing classes
Components and Containers
• A component is an independent visual control, such as a push button or
slider.
• A container holds a group of components.
• A container is a special type of component that is designed to hold
other components.