/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package javatest; import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.text.Font; import javafx.scene.text.Text; import javafx.stage.Stage; public class JavaTest extends Application{ public static void main(String[] args) { Application.launch(args); } @Override public void start(Stage stage) throws Exception { Scene scn = new Scene(new Group(), 400 , 400); Text txt = new Text("something"); txt.setX(30); txt.setY(130); System.out.println(Font.getFamilies().get(2)); txt.setFont(Font.font("Adobe Garamond", 120)); ((Group)scn.getRoot()).getChildren().add(txt); stage.setScene(scn); stage.setVisible(true); } }