Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8116744

Node is never rendered after it leaves the visible part of the scene

XMLWordPrintable

      When a node leaves a scene and returns back, it is not rendered any more. Reproducible with following code:

          @Override
          public void start(Stage stage) {
              final Group root = new Group();
              Scene scene = new Scene(root, 500, 500, Color.BLACK);
              final Rectangle r = new Rectangle(0, 0, 250, 250);
              r.setFill(Color.BLUE);
              root.getChildren().add(r);
              
              TranslateTransition transition = new TranslateTransition(
                      Duration.seconds(2), r);
              transition.setToX(550);
              
              transition.setCycleCount(Timeline.INDEFINITE);
              transition.setAutoReverse(true);
              transition.play();
              
              stage.setTitle("JavaFX Scene Graph Demo");
              stage.setScene(scene);
              stage.setVisible(true);
          }

            msladecek Martin Sládeček
            psafrata Pavel Šafrata
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: