Java’s Graphics class,in the java.awt package,provides methods to draw fig-
ures such as rectangles, circles,and lines; to set the colors for drawing; and
to write text in a window.
Each drawing method requires you to specify the location in the window to
start drawing.Locations are expressed using an (x,y) coordinate system.
Each coordinate corresponds to a pixel. The xcoordinate specifies the hori-
zontal position, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.