Strange assignment, not allowing you to use the Graphics class method.
Have you looked in the API doc at all the setPixel methods available? There are lots of them in different classes. Go to the S-Index and use the browser's Search