Stop writing code and read a tutorial on how Swing handles painting components. There are many articles available if you search but the following is a pretty good one http://java.sun.com/products/jfc/tsc/articles/painting/

It's pointless trying to solve your problem unless you understand how the system works.

I can't offer more help as you haven't really explained what your problem is.