CP2003 - Principles of Programming Languages
Page 1 of 30
Java GUIs II
Back
Index
Next
The Class
Graphics
and Painting
All graphical user interface systems have a concept of a graphics data structure to store context-specific information about a drawing area.
This drawing area could be the whole screen, a portion of the screen (component, window, frame, ...) or even a printer.
Benefits:
Programmer can address each different drawing area
on its own
.
Graphics data structure is
device independent
.
In Java:
Graphics data structure is represented by abstract class
Graphics
.
Each
Component
has its associated
Graphics
object.
Marc Gysin, James Cook University.
Back
Index
Next