Class GridLayer

A grid layer displays a rectangular grid. It can be made to display
grid lines, grid vertices, or both. For grid lines, the stroke
and the paint can be specified; for grid vertices, the shape
drawn at the vertex and the paint can be specified. Reasonable
default are also supplied.

paint

public void paint(java.awt.Graphics2D g)

Paint this layer onto a 2D graphics object. If the layer
is not visible, return immediately. Otherwise paint the grid
lines if they have a non-null paint, and paint the grid vertices
if they have a non-null paint.

paint

Paint this layer onto a 2D graphics object, within the given
region. If the layer is not visible, return
immediately. Otherwise paint the grid
lines if they have a non-null paint, and paint the grid vertices
if they have a non-null paint.