package de.fhg.iwes.javafx.test.maven; import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.control.Label; import javafx.scene.paint.Color; import javafx.scene.text.Font; import javafx.stage.Stage; public class JavaFxColorDeviation extends Application { public static void main(String[] args) { Application.launch(JavaFxColorDeviation.class, args); } @Override public void start(final Stage primaryStage) throws Exception { primaryStage.setTitle("JavaFX 2.0 beta 28. June 2011"); final Group root = new Group(); final Scene scene = new Scene(root, 600, 250); Label lblCached = new Label("Cached Label"); lblCached.setLayoutX(50); lblCached.setLayoutY(100); lblCached.setFont(Font.font("Arial", 30)); lblCached.setTextFill(Color.web("#6A9226")); lblCached.setCache(true); root.getChildren().add(lblCached); Label lblNotCached = new Label("Not cached Label"); lblNotCached.setLayoutX(310); lblNotCached.setLayoutY(100); lblNotCached.setFont(Font.font("Arial", 30)); lblNotCached.setTextFill(Color.web("#6A9226")); lblNotCached.setCache(false); root.getChildren().add(lblNotCached); primaryStage.setScene(scene); primaryStage.setVisible(true); } }