With the help of a swing, he is given the transformation
paint (Graphics g) { Graphics2D g2d = (Graphics2D) g; ...... }
will always work? Or can there be different graphic implementations, and not just Graphics2D?
Short answer: yes, it should work if you are not using any other JVM. I cannot remember since when exactly, but the Paint Swings engine will always use an instance of Graphics2D to execute its layout.