I was wondering how `java.awt.Graphics` works and so I went to the source code through NetBeans. I noticed that Graphics is an abstract class and all of the function I am using are abstract methods.

This made me think, how can I use Graphics?

I mean, Graphics is an abstract class and I am using an Graphics object within JPanel. How does it work? How can I use it, as an abstract class, without using a class that implements Graphics?