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 overrid