PrefWidth/Height calculations only works if stage is shown
tom.schindl at bestsolution.at
Thu Aug 8 14:26:00 PDT 2013
I've been trying to open a window in the minimal dimension needed by
components but it looks like size calculations prefHeight/prefWidth only
works if the stage is shown.
I need the dimensions before showing the stage because I want to
position it on the lower right of the screen before showing the stage
because if doing it afterwards leads to flickering.
> BorderPane g = new BorderPane();
> TableView<String> v = new TableView<String>();
> Scene s = new Scene(g);
> System.err.println(g.prefWidth(-1)); // 0
> System.err.println(g.prefWidth(-1)); // 248
Is this working as designed?
More information about the openjfx-dev