O'Reilly logo

Learn JavaFX 8: Building User Experience and Interfaces with Java 8 by Kishori Sharan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

// FlowPaneTest.javapackage com.jdojo.container;import javafx.application.Application;import javafx.scene.Scene;import javafx.scene.control.Button;import javafx.scene.layout.FlowPane;import javafx.stage.Stage;public class FlowPaneTest extends Application {        public static void main(String[] args) {                Application.launch(args);        }        @Override        public void start(Stage stage) {                double hgap = 5;                double vgap = 10;                FlowPane root = new FlowPane(hgap, vgap);                // Add ten buttons to the flow pane                for(int i = 1; i <= 10; i++) {                        root.getChildren().add(new Button("Button " + i));                }                root.setStyle("-fx-padding: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required