1 package org
.lttng
.scope
.tmf2
.views
.ui
.jfx
.examples
;
3 import org
.eclipse
.jdt
.annotation
.Nullable
;
5 import javafx
.animation
.FadeTransition
;
6 import javafx
.application
.Application
;
7 import javafx
.scene
.Group
;
8 import javafx
.scene
.Scene
;
9 import javafx
.scene
.shape
.Rectangle
;
10 import javafx
.stage
.Stage
;
11 import javafx
.util
.Duration
;
13 public class FadeTransitionEx
extends Application
{
15 public static void main(String
[] args
) {
16 Application
.launch(args
);
20 public void start(@Nullable Stage primaryStage
) {
21 if (primaryStage
== null) {
25 Group group
= new Group();
26 Rectangle rect
= new Rectangle(20,20,200,200);
28 FadeTransition ft
= new FadeTransition(Duration
.millis(5000), rect
);
33 group
.getChildren().add(rect
);
35 Scene scene
= new Scene(group
, 300, 200);
36 primaryStage
.setScene(scene
);
This page took 0.032404 seconds and 5 git commands to generate.