Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 18

GOOD MORNING

EVERY ONE….!
JAVA SWING
OVERWIEW
 What is Swing?
 Characteristics of MVC Architecture.
 Features of Swing API.
 Java Swing Components.
What is Java Swing

 Java Swing is a part of Java Foundation Classes(JFC) that is used to create windows-
based applications. It is build on the top of AWT (Abstract Windowing Toolkit) API and
entirely written in java.
 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, JList etc.
Characteristics of MVC Architecture

 The Swing Components data is represented using MODEL.


 It is visually represented using a VIEW.
 The CONTROLLER components of the MVC architecture reads input from the user on
the view and then this changes are past to the component data.
 In each swing component, the view and controller are expressed together. While the
model is a separate one. This gives swing a pluggable look and feel feature.
Features of Swing API
(Application Programming Interface)

 Swing components are platform independent.


 The API is extensible.
 Swing components are lightweight. The swing components are written in pure java and
also components are rendered using java code instead of system calls.
 Swing API provides a set of advanced controls like tabbed pane, tree, color Peaker, table
control etc.
 We can simply change the value and thus alter the look and feel at run time.
Java Swing Components

 Swing has a big set of components. A component can be defined as a control that can be
represented visually and is usually independent.
Here some components are:-
 JLabel control
 JButton control
 JTextField control
 JPasswordField control
 JCheckBox control
 JRadioButton control
 JComboBox control
 JList control
 JTable control
JLabel control

 A JLabel object is a component for placing text in a container.


JButton control

 This class creates a labeled button.


JTextField control

 A JTextField object is a text component that allows for the editing of a single line
of text.
JPasswordField control

 A JPasswordField object is a text component specialized for password entry.


JCheckBox control

 A JCheckBox is a graphical component that can be in either an on (true) or off


(false) state.
JRadioButton control

 The JRadioButton class is a graphical component that can be in either an on


(true) or off (false) state. in a group.
JComboBox control

 A JComboBox component presents the user with a to show up menu of choices.


JList control

 A JList component presents the user with a scrolling list of text items.
JTable control

 This is a class which is used for creating a table control. It is a combination of rows and
columns.
Bibliography

 Book- Java 6 Programming Black Book, Dream Teach


 Rahul Prasad
Assistant Professor
M.Tech(IT), MCA
Vinoba Bhave University, Hazaribagh
THE

END
Thanking You…!

You might also like