Table of Contents
Java Tutorial 1998 Part 3: Graphics and the Abstract Windowing Toolkit
Applets and Graphics
The java.awt.Graphics class
Methods for drawing in the Graphics Class
Graphics is Event-Driven: paint method
Changing Graphics: repaint method
The java.awt.Font and FontMetrics Class
The java.awt.Color Classes
Graphics Examples
Introducing a Single Thread
Introduction to Threads
Example showing the standard thread methods
Example showing thread methods, continued
Motion (or Animation) Example using threads and parent/child hierarchy
Designing the Classes
The Class Hierarchy of this example
Images and Double Buffering
Getting Images Downloaded
Drawing Images to the applet window
Image Downloading -- imageObserver, MediaTracker
An Image Drawing Example
Flickering in Applets and its Solution
The default Update(Graphics g) Method
Double Buffering to Reduce Flicker - I
Double Buffering to Reduce Flicker - II
Double Buffering
Abstract Windowing Toolkit (AWT):
AWT GUI Components
Picture of the AWT Component Class and its inheritance
Basic AWT Components
Basic AWT Component: Label
Basic AWT Component: Button
The AWT Event Model
Setting up ActionEvents for a Button
The Event Classes
AWT Components -- Text Fields & Areas
AWT Components -- Checkbox
AWT Components -- Radio Buttons , CheckboxGroup
Some Further AWT Components -- typical subunits of panels
Keyboard and Mouse Events
Mouse Events
Using Mouse Events for User Interaction
Separate Classes for Event Listeners
Adapter Classes
Abstract Windowing Toolkit (AWT):Layouts
Layout of Components in a Panel
Brief Description of LayoutManagers
Description and Example of BorderLayout
FlowLayouts in detail
GridLayouts
Hierarchical Use of Layouts
Abstract Windowing Toolkit (AWT):More Components
AWT Component: Canvas
Some Further AWT Components: Window (Frame and Dialog)
Frames can have MenuBars
Dialog Boxes
New Components: ScrollPanes and PopupMenus
PPT Slide
|