Its paintComponent(...).
Having said that I would advise you to use this strategy instead,
(and forget about super methods invokation):
Code:
public void update (Graphics g) {
Color c=g.getColor(); // remember context color
g.setColor(Color.lightGray);
g.fillRect(0,0,getSize().width, getSize().height);
int v1;
int v2;
v1 = startingx;
v2 = startingy;
g.setColor(Color.red); // or any other color, except lightGray
while (v1 <= getWidth()) {
g.drawLine(v1, v2, v1 + startingl, v2);
v1 += startingl;
g.drawLine(v1, v2, v1, v2 + startingl);
v2 += startingl;
}
g.setColor(c); // restore context color
}
public void paint(Graphics g) {
update(g);
}
PS: never invoke the paint() method from the update() method, it will never finish....
Bookmarks