You have been given help many times on custom painting.
You have been given a link to the Swing tutorial and asked to follow the example code.
The code you posted does NOT follow the code from the tutorial.
Go back to the examples that worked and figure out what you changed.
You were given a link to that tutorial for a reason. Don't just randomly change the structure of the code. All that should change is the details of the painting code.
Maybe he went home and went to bed. And took this tiny ad with him:
a bit of art, as a gift, the permaculture playing cards