Hi Bob,
Welcome to JavaRanch!
The variables A, B, and C are defined inside the method main(). That means, by default, that they're only available inside main(). If you try to use them in paint(), as you do here, the compiler will complain that it doesn't know which A, B, and C you mean, since there are none that apply during paint().
There are a couple of ways to
exchange information between methods. One way is by passing the variables as
arguments -- just as you pass the
string firstNumber to the Integer.parseInt() method, you could imaging passing A, B, and C to paint().
Unfortunately, in this case, paint() doesn't accept any int arguments, so that isn't going to work here. What you could do instead is make A, B, and C into
static variables defined in the scope of the class itself, not inside main(). Such variables would be useable by all the methods in the class.
And remove the definitions inside main().