List of usage examples for javafx.scene.paint Color RED
Color RED
To view the source code for javafx.scene.paint Color RED.
Click Source Link
From source file:Main.java
@Override public void start(final Stage primaryStage) { Group root = new Group(); Scene scene = new Scene(root, 400, 300, Color.WHITE); GridPane gridpane = new GridPane(); ComboBox<Rectangle> cmb = new ComboBox<Rectangle>(); cmb.getItems().addAll(new Rectangle(10, 10, Color.RED), new Rectangle(10, 10, Color.GREEN), new Rectangle(10, 10, Color.BLUE)); gridpane.add(cmb, 2, 0);//from w w w . j av a 2 s. c om root.getChildren().add(gridpane); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle("Text Fonts"); Group root = new Group(); Scene scene = new Scene(root, 550, 250, Color.web("0x0000FF")); Text text = new Text(50, 100, "JavaFX 2.0 from Java2s.com"); Font sanSerif = Font.font("Dialog", 30); text.setFont(sanSerif);/* w ww . j a v a 2s .com*/ text.setFill(Color.RED); root.getChildren().add(text); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle("Text Fonts"); Group root = new Group(); Scene scene = new Scene(root, 550, 250, new Color(0, 0, 1, 1.0)); Text text = new Text(50, 100, "JavaFX 2.0 from Java2s.com"); Font sanSerif = Font.font("Dialog", 30); text.setFont(sanSerif);//from w w w . jav a 2 s. c o m text.setFill(Color.RED); root.getChildren().add(text); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle("Text Fonts"); Group root = new Group(); Scene scene = new Scene(root, 550, 250, Color.web("0x0000FF", 1.0)); Text text = new Text(50, 100, "JavaFX 2.0 from Java2s.com"); Font sanSerif = Font.font("Dialog", 30); text.setFont(sanSerif);/*from ww w . j av a 2 s .c om*/ text.setFill(Color.RED); root.getChildren().add(text); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle("Text Fonts"); Group root = new Group(); Scene scene = new Scene(root, 550, 250, Color.hsb(270, 1.0, 1.0, 1.0)); Text text = new Text(50, 100, "JavaFX 2.0 from Java2s.com"); Font sanSerif = Font.font("Dialog", 30); text.setFont(sanSerif);//from w w w . ja va 2 s . c om text.setFill(Color.RED); root.getChildren().add(text); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle("Text Fonts"); Group root = new Group(); Scene scene = new Scene(root, 550, 250); Text text = new Text(50, 100, "JavaFX 2.0 from Java2s.com"); Font sanSerif = Font.font("Dialog", 30); text.setFont(sanSerif);/*w w w . j av a 2 s . c o m*/ text.setFill(Color.RED); root.getChildren().add(text); BoxBlur bb = new BoxBlur(); bb.setWidth(15); bb.setHeight(15); bb.setIterations(3); text.setEffect(bb); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { final Group group = new Group(); Scene scene = new Scene(group, 300, 150); stage.setScene(scene);/*from w w w . j a v a 2s . c o m*/ stage.setTitle("Sample"); Rectangle rect = new Rectangle(100, 40, 100, 100); rect.setArcHeight(50); rect.setArcWidth(50); rect.setFill(null); StrokeTransition st = new StrokeTransition(Duration.millis(3000), rect, Color.RED, Color.BLUE); st.setAutoReverse(true); st.play(); group.getChildren().add(rect); stage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle("Text Fonts"); Group root = new Group(); Scene scene = new Scene(root, 550, 250, Color.web("0x0000FF", 1.0)); Text text = new Text(50, 100, "JavaFX 2.0 from Java2s.com"); Font sanSerif = Font.font("Dialog", 30); text.setFont(sanSerif);// w w w . j a v a 2 s. c o m text.setFill(Color.RED); root.getChildren().add(text); BoxBlur bb = new BoxBlur(); bb.setWidth(15); bb.setHeight(15); bb.setIterations(3); text.setEffect(bb); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle(""); Group root = new Group(); Scene scene = new Scene(root, 300, 250, Color.WHITE); Text t = new Text(); t.setX(10.0);/* w w w . j ava 2s. c o m*/ t.setY(50.0); t.setCache(true); t.setText("Reflections on JavaFX..."); t.setFill(Color.RED); t.setFont(Font.font(null, FontWeight.BOLD, 30)); Reflection r = new Reflection(); r.setFraction(0.7); t.setEffect(r); root.getChildren().add(t); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle(""); Group root = new Group(); Scene scene = new Scene(root, 300, 250, Color.WHITE); Group g = new Group(); Text t = new Text(); t.setX(10.0);/* w w w . ja va 2s. c om*/ t.setY(40.0); t.setCache(true); t.setText("Blurry Text"); t.setFill(Color.RED); t.setFont(Font.font(null, FontWeight.BOLD, 36)); t.setEffect(new GaussianBlur()); g.getChildren().add(t); root.getChildren().add(g); primaryStage.setScene(scene); primaryStage.show(); }