public void draw(Graphics g, Line aLine) {
   // Hover over drawLine in case you do not understand what it does
   g.drawLine(
       aLine.getX(),
       aLine.getY(),
       aLine.getX() + aLine.getWidth(),
       aLine.getY() + aLine.getHeight());
 }
 public void setAxesLength(int newVal) {
   int lengthIncrease = newVal - axesLength;
   Line xAxis = cartesianPlane.getXAxis();
   Line yAxis = cartesianPlane.getYAxis();
   xAxis.setX(xAxis.getX() - lengthIncrease / 2);
   yAxis.setY(yAxis.getY() - lengthIncrease / 2);
   updateXOfLabel(xLabel, xLabel.getLocation().getX() + lengthIncrease / 2);
   updateYOfLabel(yLabel, yLabel.getLocation().getY() - lengthIncrease / 2);
   axesLength = newVal;
   xAxis.setWidth(axesLength);
   yAxis.setHeight(axesLength);
 }