2.
In this presentation you will learn how to use
coponents offer by Swing API in Java
Netbeans.
You will also be introduced by some basic
things like Pallete, Design Area, the Property
Editor, and the Inspector which are very
useful to know.
6.
Pallete contains all components which you
can use while making a GUI application. The
Pallete provides you components like
jTextField,jLabel etc.
You can design Swing GUIs by dragging GUI
components from a palette onto a canvas.
7.
8. The Design area is where you can
drag the components from Pallete
and design the GUI application.
In Netbeans you are provided with
an option to toggle between
source and Design by clicking in
button provided.
For Ex- In this I have designed a
GUI using swing components in
jFrame object .
9. Take a quick look at Source View
where you can add the code for
components.
10.
11. The Property Edior edits the property of
Swing Components.
You can edit properties very easily using this
property editor. You can see it in the
screenshot provided.
12.
jLabel – it is a label used to display a single line text in application.
jTextField- It is used to take a input from user in a application.
jTextArea – It is used to display multi line text, it also supports line
wrap. We can make it editable or non editable by changing property.
jCheckbox-A checkbox is a labeled toggle switch. Each time the user
clicks it, its state toggles between checked and unchecked. Swing
implements the checkbox as a special kind of button.
JRadioButton-Radio buttons are similar to checkboxes, but they are
usually arranged in groups. Click on one radio button in the group,
and the others automatically turn off. They are named for the preset
buttons on old car radios.
jList- It is a list of items from which selections can be made.
Multiple elements can also be selected at a time.
jComboBox- It provides a dropdown list of items. New Items can be
added to it.