public void paintComponent(Graphics g) {
      Graphics2D g2 = (Graphics2D) g;
      super.paintComponent(g2);

      // Draw randomly generated nodes
      for (Node p : myGraph.getNodes())
        drawPoint(g2, p.x, p.y);

      //Draw selected Nodes
      g2.setColor(Color.blue);
      if (fromNode != null)
        graphPanel.drawPoint(g2 , fromNode.x, fromNode.y);
      if (toNode != null)
        graphPanel.drawPoint(g2 , toNode.x, toNode.y);

      g2.setColor(POINT_COLOR);

      g2.setStroke(new BasicStroke(2));
      //g2.setColor(Color.red);
      drawEdges(g2, myGraph.getEdges());
      g2.setStroke(new BasicStroke(3));
      g2.setColor(Color.blue);
      drawEdges(g2, path);

      g2.setColor(POINT_COLOR);
      // Draw zoom box
      if (zoomBox != null)
        g2.draw(zoomBox);
    }