/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package javafxbugs; import javafx.application.Application; import javafx.geometry.Insets; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.layout.StackPane; import javafx.stage.Stage; public class CheckBoxBackgroundSpace extends Application { public static void main(String[] args) { launch( args); } private Parent getContent() { StackPane list = new StackPane(); list.setPadding(new Insets(10)); Button but = new Button("Button long long line"); but.setMinSize(20,20); but.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE); list.getChildren().add(but); return list; } public void start(Stage stage) { stage.setX(100); stage.setY(100); stage.setWidth(300); stage.setHeight(300); Scene scene = new Scene(getContent()); scene.getStylesheets().add("javafxbugs/space.css"); stage.setScene(scene); stage.show(); } }