title: Drawing lines between Shapes laid out in HBox and VBox
body: <p>I have a circle inside various containers (ScrollPane, Group, HBox and VBox)</p>
  
  <p>I want to draw a line from 0,0 to the centre of the circle. </p>
  
  <p>I think the code below shows the problem. There is some function unknown to me which should go 
  in //SOME CODE HERE TO WORK OUT WHERE THE CIRCLE IS to make it work</p>
  
  <p>I have a sample application I wrote to simplify my problem.</p>
  
  <pre><code>import java.util.Random;
  
  import javafx.application.Application;
  import javafx.geometry.Insets;
  import javafx.scene.Group;
  import javafx.scene.Scene;
  import javafx.scene.control.ScrollPane;
  import javafx.scene.layout.HBox;
  import javafx.scene.layout.VBox;
  import javafx.scene.shape.Circle;
  import javafx.scene.shape.Line;
  import javafx.stage.Stage;
  
  public class TestAppForCoords extends Application {
  
      //Scene Graph:
      //ScrollPane - scroll
      // - Group - root
      //   - HBox - hbox - with random padding
      //     - VBox
      //     - VBox - vbox - with random padding
      //       - Circle - circle
      //     - VBox
      //   - Group - lines
      //     - Line - line
  
  
      @Override
      public void start(final Stage primaryStage) throws Exception {
          Random rand = new Random();
          int randomNum1 = rand.nextInt((100 - 0) + 1) + 0;
          int randomNum2 = rand.nextInt((100 - 0) + 1) + 0;
          System.out.println(randomNum1);
          System.out.println(randomNum2);
  
  
          ScrollPane scroll = new ScrollPane();
          scroll.setPrefSize(500, 300);
          Scene scene = new Scene(scroll);
  
          primaryStage.setScene(scene);
  
  
          Group root = new Group();
  
          HBox hbox = new HBox();
  
          hbox.setPadding(new Insets(randomNum1));
  
          VBox vbox = new VBox();
          hbox.getChildren().add(new VBox());
  
          vbox.setPadding(new Insets(randomNum2));
          hbox.getChildren().add(vbox);
          hbox.getChildren().add(new VBox());
  
          Circle circle = new Circle();
          circle.setRadius(10);
          vbox.getChildren().add(circle);
  
  
          Group lines = new Group();
          root.getChildren().add(hbox);
          root.getChildren().add(lines);
  
          root.autosize();
  
  
          Line line = new Line();
          line.setStartX(0);
          line.setStartY(0);
  
          //SOME CODE HERE TO WORK OUT WHERE THE CIRCLE IS
          line.setEndX(123);
          line.setEndY(123);
  
          lines.getChildren().add(line);
  
  
          scroll.setContent(root);
  
          primaryStage.show();
      }
  
  
  
      public static void main(String[] args) {
          System.out.println("Start JavaFXTestApp");
          launch(args);
          System.out.println("End JavaFXTestApp");
      }   
  }
  </code></pre>