13.15. Chapter Summary

 
[Page 425]

Chapter 13. Graphics

Mayan God Shel, Mexico. Photographer: Philip Coblentz. Courtesy Brand X Pictures.

Objectives

  • To understand Java coordinate systems ( §13.2).

  • To draw things using the methods in the Graphics class ( §13.3).

  • To understand how and when a Graphics object is created ( §13.3).

  • To override the paintComponent method to draw things on a GUI component ( §13.4).

  • To use a panel as a canvas to draw things ( §13.5).

  • To draw strings, lines, rectangles, ovals, arcs, and polygons ( § §13.6, 13.8 “13.9).

  • To obtain font properties using FontMetrics and know how to center a message ( §13.10).

  • (Optional) To display image in a GUI component ( §13.13).

  • To develop reusable GUI components FigurePanel , MessagePanel , StillClock , and ImageViewer ( § §13.7, 13.11, 13.12 Optional, 13.14 Optional).


[Page 426]

13.1. Introduction

The preceding chapter introduced GUI components and their relationships, containers and layout managers, colors, fonts, and image icons. This chapter introduces how to paint graphics on GUI components. You will learn how to draw strings, lines, rectangles, ovals, arcs, polygons, and images, and how to develop reusable GUI components.

 


Introduction to Java Programming-Comprehensive Version
Introduction to Java Programming-Comprehensive Version (6th Edition)
ISBN: B000ONFLUM
EAN: N/A
Year: 2004
Pages: 503

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net