import javafx.application.Application; import javafx.stage.Stage; import javafx.scene.Scene; import javafx.scene.layout.GridPane; import javafx.scene.layout.HBox; import javafx.scene.text.Text; public class App extends Application{ @Override public void start(Stage stage){ GridPane root = new GridPane(); HBox hbox = new HBox(new Text("A"), new Text("B")); root.add(hbox, 0,0); Text c = new Text("C"); Text d = new Text("D"); Text e = new Text("E"); root.add(c, 1, 0); root.add(d, 0, 1); root.add(e, 1, 1); Scene scene = new Scene(root); stage.setScene(scene); root.setHgap(10); root.setVgap(10); stage.setMinWidth(200); stage.show(); } }