Okay, the first thing you want to do is get this to
compile. If you keep adding things while there are still errors, you will only compound the problems.
The biggest issue is that your code is mostly inside the static method main, and you're trying to call non-static methods from that context. Remember,
in a static (class) context, you can't call non-static (instance) members because there's no way to know which instance you might mean (or even whether an instance exists). You're also trying to reference the instance "this," which (for the same reason) does not exist in a static context.
So my first advice is to move that code outside of main. What you have so far is basically getting a ColorButtons instance ready for use, so a reasonable (or at least convenient) place to put the code might be inside a ColorButtons
constructor. Then you could simply use main to call the constructor.
The next issue preventing this from compiling is that your class says it implements WindowListener and ItemListener, but it's not providing implementation for the methods in those interfaces. My advice here is to
remove the WindowListener for now, and just work on implementing the ItemListener. Check the
API documentation to see what method needs to be implemented for this interface.
Then, when this compiles and you're ready to move forward, go one step at a time. Add a line or two, then recompile to make sure there are no errors. Don't keep adding things until the errors are resolved.