Eclipse should always show you where the error is, with a little red icon with a cross in. Hover your mouse over that and you get more details. What it cannot tell you is whether you are using object‑oriented design or not, and that isn’t even close! In my opinion
addActionListener(this) is an abomination against object‑oriented programming, and all the people who write books using it ought to be strung up and beaten with several megabytes of C code
Start
here. You will want some sort of class. How about this?
There are obviously bits you will have to fill in for yourself. Search for my posts on this forum with “ColourListener” as a keyword, and you will find more. But I don’t think you will find a complete class.