I just wanted to say thank you to Craig for posting that class, it's one of the few that actually makes sense and is easy to follow. Other classes using Affine Transform have been horrific to understand. So yeah, thank you very much, you've been a big help )
Always start paintComponent with a super call and it has protected access, as in Craig Wood's post.
Don't use AffineTransforms on a Graphics object and then reuse the Graphics object. Take a defensive copy. What happens is that the calculations for the transform may be impossible to undo exactly, because of the imprecision of floating‑point arithmetic. Scale and translate usually can be undone and I have not had problems with rotate, but shear causes problems. The affine transforms also seem to be built into the Graphics2D object, so you have simpler ways to access them