title: JavaFX draw Multi shape using multiple points
body: <p>I have an arraylist of Point. I want to draw lines out the points. Here is what I have done.</p>
  
  <pre><code>for (int i = 0; i &lt; arrPoint.size(); i++) {
              Point startPoint = arrPoint.get(i);
              Point endPoint = null;
              if (i == arrPoint.size()) {
                  endPoint = arrPoint.get(0);
              } else {
                  endPoint = arrPoint.get(i + 1);
              }
              Line line = new Line();
              line.setStartX(startPoint.getCoordinateX());
              line.setEndX(endPoint.getCoordinateX());
              line.setStartY(startPoint.getCoordinateY());
              line.setEndY(endPoint.getCoordinateY());
              box.getChildren().add(line);
          }
  </code></pre>
  
  <p>My Point cass is like</p>
  
  <pre><code>public class Point {
      private double coordinateX;
      private double coordinateY;
  
      public Point(double coordinateX, double coordinateY) {
          this.coordinateX = coordinateX;
          this.coordinateY = coordinateY;
      }
  
      public void setCoordinateX(double coordinateX) {
          this.coordinateX = coordinateX;
      }
  
      public void setCoordinateY(double coordinateY) {
          this.coordinateY = coordinateY;
      }
  
      public double getCoordinateX() {
          return coordinateX;
      }
  
      public double getCoordinateY() {
          return coordinateY;
      }
  }
  </code></pre>
  
  <p>My code is displayed blank. I am new to JavaFx. Can I get any help?</p>