Introduction - If you have any usage issues, please Google them yourself
AWT components that are displayed on the computer screen contain a
paintmethod with aGraphicsobject as its argument. In order to use the
facilities of Java 2D for the corresponding AWT component, it is necessary to
cast this Graphicsobject into aGraphics2Dobject. The classGraphics2D
within Java 2D extends the classGraphics.