There are many types of events that are generated by your AWT Application.
These events are used to make the application more effective and efficient.
Generally, there are twelve types of event are used in Java AWT.
In this section, you will learn how to handle events in Java awt. Events are the integral part of the java platform.
Event Adapters There are some event listeners that have multiple
methods to implement. That is some of the listener interfaces contain more than one method.
Button Pressing Example In the program code given below, the Frame contains
three buttons named - "Bonjour", "Good Day",
Adapters Example In the following program code, the adapter class has been used.
This class has been used as an anonymous inner class to draw a rectangle within an applet.
GUI-based Applications In this section you will learn about how to create a window for your
application. You need to define a subclass of Frame to create a window for your
Menus We can also develop an application with a Menu.
As a name indicates a Menu consists of Menu objects.
Menu Shortcuts The MenuItem class also provides
a feature of menu shortcuts and speed keys.
Pop-up Menus A PopupMenu is similar to a Menu as it
contains MenuItem objects. The Pop-up Menu can be popped over any
component while generating the appropriate mouse event rather than letting it
appear at the top of a Frame.
This program shows you how to create a frame in java AWT package. The
frame in java works like the main window where your components (controls)
are added to develop a application. In the Java AWT, top-level windows are
represented by the Frame class.
This program illustrates you how to create a container. Container
contains several control or tools for develop your application. All the
controls used in your application are the container for one another.
In this section, you will learn about handling the focus changes in
java. This section shows you how the event be handled according to the
focuses and to find out whether the component got the focus or lost the
In this section, you will learn how to handle different key events
on the Java Awt component by using the event handling in Java. When the
given program is executed then you will see the several key events these are
applied on the component like the key pressed, key release and so on.
This is a simple program of java awt package which constructs a look like a form by using various java component. In this section, you will learn how to create it. This is done by using java gui programming using Classes or APIs of java awt package.
In this section, you will learn how to create Button on frame
the topic of Java AWT package. In the section, from the generated output of
the following program, complete window or frame is created in the ButtonText
class that is the main class where the main() method lies.
This part of the topic will show a simple command button labeled with the
text "Submit" when the program will be executed.
This is very simple java program. In this section, you will learn
how to create CheckBox on the frame. In the Java AWT, top-level windows are
represented by the CheckBox class. This program provides you complete
illustration with the full description. If you are fresher in java awt
programming then you can learn in very efficient manner.
In this section, you will learn how to create arcs diagram in java awt
package. The Java program uses Arcs2D class, arcs2D is the abstract
superclass for all objects that store a 2D arc defined by a bounding
rectangle, start angle, angular extent and a closure type.
In this section, you will learn how to create Cubic diagram. The
Java2D API provides you several classes that defines common Geometry
object as a coordinate component. The Java Drawing program depends on the
Java2D API class, and this class is support by the "java.awt.geom"
This is a simple program of java awt. In this section, you will learn
how to create Circle Diagram. The java circle is the most fundamental
abstractions in a Java 2D in the supported java.awt.shape package.
In this section, you will learn how to create CurveDraw in java.awt
package. This class, supported by the java.awt.geom package, enables
you to create a quadratic or cubic segment. Here, you will see in the
following example that provide you complete code of the program.
This is a simple java program . In this section, you will learn how to
create Line Drawing. This program implements a line Drawing component.
A java program explains the stroke line i.e. how to make thick and thin
line. For this we have used BasicStroke class. This
object is passed to the setStroke() method.
In this section, you will learn how to create Radio Button on the frame.
The java AWT , top-level window, are represent by the CheckBoxGroup. A
java program provides you CheckboxGroup. In this program, you will see how
to create and show the Checkboxgroup component on the frame.
In this section, you will learn how to create rectangle image. This
program used the Graphics2D class which extends the Graphic class and
control all geometry or coordinate transformation and color
management, text layout. The Java programming in java 2D API
provides several classes.
In this section, you will learn how to create TextArea on the frame.
This program uses the TextArea class of java.awt package. Here, we are
going to create TextArea object. TextArea object is a multiline
region. It displays text only. You can read and edit the text only.
This section simply display the image demo that means multiple images
and its name are based on the frame to a particular location. For displaying
images demo first of all you will need multiple images that have to be
displayed on the frame.
Open The Default Editor to Edit the File This section, you will see the method of opening the file in the default
editor to edit and save the file. Here an example has been provided with the
complete Java code for illustrating all the things that helps to open the file
in the default editor to edit the file.