public void update(Graphics g){
Dimension d=getSize();
if ((offscreen == null) || (d.width != offscreensize.width) || (d.height != offscreensize.height)) {
offscreen = createImage(d.width, d.height);
offscreensize = d;
offgraphics = offscreen.getGraphics();
offgraphics.setFont(getFont());
offgraphics.fillRect(0, 0, d.width, d.height);
offgraphics.setColor(Color.white);
offgraphics.fillRect(0, 0, d.width, d.height);
offgraphics.setColor(Color.black);
mypaint(offgraphics);
g.drawImage(offscreen, 0, 0, null);
}
このときのmypaintの役割について教えてください