Java AWT

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 13

1

Java Programming

Java AWT
Java AWT
2

Java AWT (Abstract Window Toolkit) is an API to develop GUI or window-based


applications in java.

Java AWT components are platform-dependent i.e. components are displayed


according to the view of operating system.

The java.awt package provides classes for AWT api such as TextField, Label,
TextArea, RadioButton, CheckBox, Choice, List etc.
Java AWT
3
Java AWT Button
4

The button class is used to create a labeled button that has platform independent
implementation. The application result in some action when the button is pushed.
Java AWT Label
5

The object of Label class is a component for placing text in a container. It is used to
display a single line of read only text. The text can be changed by an application but a
user cannot edit it directly.
Java AWT TextField
6

The object of a TextField class is a text component that allows the editing of a single
line text. It inherits TextComponent class.
Java AWT TextArea
7

The object of a TextArea class is a multi line region that displays text. It allows the
editing of multiple line text. It inherits TextComponent class.
Java AWT List
8

The object of List class represents a list of text items. By the help of list, user can
choose either one item or multiple items. It inherits Component class.
Java AWT Checkbox
9

The Checkbox class is used to create a checkbox. It is used to turn an option on (true)
or off (false). Clicking on a Checkbox changes its state from "on" to "off" or from "off"
to "on".
Java AWT CheckboxGroup
10

The object of CheckboxGroup class is used to group together a set of Checkbox. At a


time only one check box button is allowed to be in "on" state and remaining check box
button in "off" state. It inherits the object class.
Note: CheckboxGroup enables you to create radio buttons in AWT. There is no special
control for creating radio buttons in AWT.
Java AWT Scrollbar
11

The object of Scrollbar class is used to add horizontal and vertical scrollbar. Scrollbar
is a GUI component allows us to see invisible number of rows and columns.
Java AWT MenuItem and Menu
12

The object of MenuItem class adds a simple labeled menu item on menu. The items
used in a menu must belong to the MenuItem or any of its subclass.

The object of Menu class is a pull down menu component which is displayed on the
menu bar. It inherits the MenuItem class.
Java AWT MenuItem and Menu
13

You might also like