Here are some of the basic building blocks of Objected-Oriented Programming that you will become familiar with:
main)
can only reference static variables in its own class (or its own local variables).
static final variables
(constants) that can be used by all methods, or by other classes.
Color.blue is an example of a static final variable.
paintComponent method, you are overriding the
one that is already defined in JPanel. In paintComponent, but not in
most overriding methods, you should call the method
in the parent class with super.paintComponent. The "super"
keyword is how you refer to the overridden parent method.
There is no way to explicitly call the "grandparent's" method
if it was overridden by the parent class.
implements an interface must define all those methods.
The method signatures (prototypes) are listed in the interface.
Interfaces may also define public static final "constants".
An interface is essentially the same as an completely abstract
class.