Javafx intersec funktioniert nicht?
class GameWindow {
    int circleX = 0;
    int circleY = 0;
    int maxX = 500;
    int maxY = 500;
    Circle circle,circlerand;
    HBox root;
    public void fenster()
    {
        figure();
        Stage stage = new Stage();
        root = new HBox();
        create();
        if(circle.getBoundsInParent().intersects(circlerand.getBoundsInParent())){
            System.out.println("circle x =" + circle.getCenterX() + " circlrand x =" + circlerand.getCenterX());
            System.out.println("GameWindow.fenster() getroffen");
            root.getChildren().remove(circlerand);
            create();
        }
        
        
        Scene scene = new Scene(root,maxX, maxY);
        scene.setOnKeyPressed((KeyEvent event) -> {
            switch (event.getCode()) {
                case UP -> {
                    if(circleY >= 2)
                    {
                        circleY -= 1;
                        circle.setTranslateY(circleY);
                        System.out.println("circle Y =" + circleY);
                        
                    }
                }
                case DOWN -> {
                    if(circleY <= (maxY - 42)){
                        circleY += 1;
                    circle.setTranslateY(circleY);
                    System.out.println("circle Y =" + circleY);
                    }
                    
                }
                case LEFT -> {
                    if(circleX >= 0){
                        circleX -= 1;
                        circle.setTranslateX(circleX);
                        System.out.println("circle x = " + circleX);
                    }
                }
                case RIGHT -> {
                    if(circleX <= maxX - 30){
                        circleX += 1;
                        circle.setTranslateX(circleX);
                        System.out.println("circle x =" + circleX);
                        
                    }
                }
                case SHIFT -> {
                System.out.println("circlerand x =" + circlerand.getCenterX() + " y=" + circlerand.getCenterY());
                    System.out.println("circle x = " + circle.getCenterX() + " y = " + circle.getCenterY());
                    
                       
                }
            }
        });
        
        
        
        root.getChildren().addAll(circle);
        stage.setScene(scene);
        stage.show();
    }
    
    private void figure(){
        circle = new Circle(circleX,circleY,15);
          
    }
    
        private void create(){
            Random rand = new Random();
            int x = rand.nextInt(450);
            int y = rand.nextInt(450);
            circlerand = new Circle(x,y,10);
            circlerand.setTranslateX(x);
            circlerand.setTranslateY(y);
            System.out.println("circlerand x =" + circlerand.getCenterX() + " y=" + circlerand.getCenterY());                    
            root.getChildren().add(circlerand);
            
            
        }
    
}

Moin, ich möchte abfragen ob 2 Kreise kollidieren jedoch funktioniert es nicht. Jemand ne Idee woran es liegt?

Java, Programmiersprache