This small JavaFX test application
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.sce
Although this is not explanation, it solves the problem:
@Override
public void start(final Stage primaryStage) throws Exception {
final Dimension d = new Dimension(210, 110);
final Rectangle rectangle = new Rectangle(d.width, d.height, Color.POWDERBLUE);
final BorderPane pane = new BorderPane(rectangle);
pane.maxWidth(d.height);
pane.maxWidth(d.width);
final Scene scene = new Scene(pane, d.width, d.height);
primaryStage.setScene(scene);
primaryStage.setResizable(false);
primaryStage.setWidth(d.width);
primaryStage.setHeight(d.height);
primaryStage.show();
}
Key is setting width and height of the Stage at the right time.