public void setValues(){
        ratio = newLength/currentLength;
        currentLength = newLength;
        
        pivotX = line_pendulum.getEndX();
        pivotY = line_pendulum.getEndY();

        if(line_pendulum.getStartX() < pivotX){
            switchInt = 3;
        }else{
            switchInt = 1;
        }

        stringX = Math.abs(line_pendulum.getStartX()-pivotX);
        stringY = Math.abs(line_pendulum.getStartY()-pivotY);

        stringX = ratio*stringX;
        stringY = ratio*stringY;
        
        line_pendulum.setStartX(pivotX+stringX);
        line_pendulum.setStartY(pivotY+stringY);  
        highestY = line_pendulum.getStartY();
        circle_pendulum.setCenterX(line_pendulum.getStartX());
        circle_pendulum.setCenterY(line_pendulum.getStartY());
    }