HI kray66 i just take a look u'r code and how its means that ju called directly the method setColor or setSize from the object MyPanel ,u must inicialize a graphics pen graphics2d a=..... ...