This is what I have and I was thinking that I can do away with the two ifs to determine color by using g.setColor(SetFontColor) where I use the variable to determine color. SetFontColor is a String and has the value of "Red" is I cilcked red and "Black" if I choose black. This code does not work, but i'm sure there's a way to do this.
This looks generally OK; what does it do wrong? Are you sure those are the exact values of the String (this is a case where I'd use named constants like 'public static final String RED = "Red";' to be sure all copies were the same) ? Are you sure the values of the line end coordinates are what you expect?
Well, if the variable "SetFontColor" were of type java.awt.Color instead of String, and you did something like
if ("Red".equals(action)) SetFontColor = Color.red;
then in your paint method you could just say
A word to the wise: the convention is that Java variable names start with a lower case. Starting them with an upper case letter makes them look like class names, and will confuse people who try to read your code -- myself included. One gets used to seeing things done a certain way!