For loop
int x = 20, y=20;
int x2 = x + 80;
for (int i =0;  i < 5 ; i++ ) {
   g.drawLine(x, y, x2, y);
   y=y+10;
}