The example I wished I had had when I started to work with Geotools.
It tries to show the basic things needed to render a shape file.
I adapted the LiteRendererTest2.java example.
- reads polylines from a shape file,
- uses a LiteRenderer to render the polylines,
- uses SLD (Styled Layer Descriptor) to describe the style to use,
- includes a few buttons to zoom and pan the rendered image, and
- additionally renders the image to a .png file.