Getting repaint issue while creating parabolic curves using awt in java

Hi I am trying to create parabolic curves using lines in awt java but previous lines are getting removed as soon as some new lines are drawn.

I am using this code in paint method

static int x1 = 0;
static int y1 = 300;
static int x2 = 300;
static int y2 = 300;

protected void paintComponent(Graphics g) {
    for(int i = 0; i < 15;i++,x1 += 4, y2 -= 2) {
        g.drawLine(x2, y2, x1, y1);

but if i iterate loop for 10 times then only its drawing lines correctly.

My ouputenter image description here

what I want to acheive is draw parabolic curves in each quadrant like this

enter image description here

ignore the red text in second image. Ref - Any help appreciated.