Summary

Section 12.1 Introduction

  • Java’s coordinate system is a scheme for identifying every point on the screen.

  • A coordinate pair is composed of an x-coordinate (the horizontal coordinate) and a y-coordinate (the vertical coordinate).

  • Text and shapes are displayed on the screen by specifying coordinates. The coordinates are used to indicate where graphics should be displayed on a screen.

  • Coordinate units are measured in pixels. A pixel is a display monitor’s smallest unit of resolution.

Section 12.2 Graphics Contexts and Graphics Objects

  • A Java graphics context enables drawing on the screen.

  • Class Graphics contains methods for drawing strings, lines, rectangles and other shapes. Methods are also included for font manipulation and color manipulation. ...

Get Java™ How to Program, Seventh Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.