Java Reference
In-Depth Information
import javafx.scene.input.MouseEvent;
import javafx.scene.paint.Color;
import javafx.scene.paint.CycleMethod;
import javafx.scene.paint.RadialGradient;
import javafx.scene.paint.Stop;
import javafx.scene.shape.Circle;
import javafx.scene.shape.LineTo;
import javafx.scene.shape.MoveTo;
import javafx.scene.shape.Path;
import javafx.stage.Stage;
import javafx.util.Duration;
/**
* Recipe 15-3: Working with the Scene Graph
* @author cdea
* Update: J Juneau
*/
public class WorkingWithTheSceneGraph extends Application
{
Path onePath = new Path();
Point2D anchorPt;
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Application.launch(args);
}
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle("Chapter 15-3 Working with
the Scene Graph");
final Group root = new Group();
// add path
root.getChildren().add(onePath);
final Scene scene = new Scene(root, 300, 250);
scene.setFill(Color.WHITE);
RadialGradient gradient1 = new RadialGradient(0,
.1,
Search WWH ::




Custom Search