package testjavafx; import javafx.application.Application; import javafx.builders.LabelBuilder; import javafx.builders.SceneBuilder; import javafx.scene.Scene; import javafx.scene.control.Label; import javafx.scene.text.Font; import javafx.stage.Stage; /** * * @author BGoetzmann */ public class TestJavaFX1 extends Application { Scene scene; @Override public void start(Stage stage) { Font f = new Font(53); Label lbl1 = LabelBuilder.create() .text("Grezi:\nZUI with JavaFX\nand\nGroovy!") .font(f) .prefWidth(200) .translateX(100) .translateY(100) .build(); scene = SceneBuilder.create() .width(800) .height(700) .root(lbl1) .build(); stage.setScene(scene); stage.setVisible(true); } /** * @param args the command line arguments */ public static void main(String[] args) { Application.launch(TestJavaFX1.class, args); } }