import javafx.application.Application; import javafx.scene.SceneBuilder; import javafx.scene.control.ButtonBuilder; import javafx.scene.control.LabelBuilder; import javafx.scene.control.ListViewBuilder; import javafx.scene.layout.PaneBuilder; import javafx.scene.layout.StackPaneBuilder; import javafx.scene.paint.Color; import javafx.stage.Popup; import javafx.stage.Stage; import javafx.stage.StageBuilder; /** * * @author Alexander Kouznetsov */ public class Bug extends Application { public static void main(String[] args) { launch(args); } @Override public void start(Stage stage) throws Exception { StageBuilder.create() .scene( SceneBuilder.create() .width(500) .height(500) .root(StackPaneBuilder.create() .build() ) .build()) .applyTo(stage); stage.show(); Popup popup = new Popup() { { getContent().setAll(StackPaneBuilder.create() .children( ListViewBuilder.create() .build(), PaneBuilder.create() .prefWidth(Double.MAX_VALUE) // Comment out these two lines .prefHeight(Double.MAX_VALUE) // to fix the app .build() ) .build()); } }; popup.show(stage); } }