Okay. So I am trying to program a game where you can decorate your own cake. When you click on the buttons their suppose to draw graphics on the top panel. But when I click on the button nothing shows up. I tried everything i could. Please help if you can, Thanks !

P.S. I am so sorry if i posted in the wrong forum, this is my first post.

So step back from your cake application as it currently stands and write something with a single button that makes a single change to the GUI. Then, when you have something that does what you want, apply it as a "pattern".

Quite likely the problem lies in the fact that your action handler doesn't cause a repaint.