9. Deep into Hello AWT
●
To create simple awt example, you need a
frame. There are two ways to create a
frame in AWT.
–
By extending Frame class (inheritance)
–
By creating the object of Frame class
(association)
●
11. Event and Listener
●
HelloAWT couldn't be closed ?!
●
We can put the event handling code into
one of the following places:
–
Same class (AEvent.java)
–
Other class (AEvent2.java)
–
Anonymous class (AEvent3.java)
●
13. JFrame
●
There are two ways to create a frame:
–
By creating the object of Frame class
(association)
–
By extending Frame class (inheritance)
●
Example:
–
FirstSwingExample.java
–
Simple.java
–
Simple2.java