/* * To change this template, choose Tools | Templates * and open the template in the editor. */ import com.sun.javafx.runtime.VersionInfo; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.ProgressIndicator; import javafx.scene.layout.BorderPane; import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; import javafx.stage.Stage; /** * * @author Aleksandr */ public class BorderInsetTest extends Application { private static final String STYLE = "-fx-border-width:1;-fx-border-color: red blue green yellow;-fx-border-insets: 5;-fx-border-radius: 5;"; @Override public void start(Stage stage) throws Exception { BorderPane root = new BorderPane(); Button b1 = new Button("Button the first line" + "\nthe sec long line" + "\nthe third line"); b1.setStyle(STYLE); HBox panel = new HBox(30); VBox box = new VBox(); box.setMinSize(40, 40); box.setStyle(STYLE); ProgressIndicator i = new ProgressIndicator(0.75d); i.setStyle(STYLE); panel.getChildren().addAll(b1, box, i); root.setCenter(panel); Scene scene = new Scene(root, 500, 500); stage.setScene(scene); stage.show(); stage.setTitle(VersionInfo.getRuntimeVersion()); } /** * @param args the command line arguments */ public static void main(String[] args) { launch(args); } }