Layout
Scott Palmer
swpalmer at gmail.com
Thu Oct 4 18:56:08 PDT 2012
On Thu, Oct 4, 2012 at 4:05 PM, Tom Eugelink <tbee at tbee.org> wrote:
> Interesting; calling prefWidth(w) & prefHeight(h) on a Pane does not do a
> thing, but using setPrefSize(w,h) works fine.
>
> Tom
>
That because they are for getting the pref width and height during layout,
you've labelled the parameter wrong.
It's:
public double prefWidth(double height)
public double prefHeight(double width)
i.e. given width X what is your preferred height?
prefHeight<http://docs.oracle.com/javafx/2/api/javafx/scene/layout/Region.html#prefHeight(double)>
prefWidth<http://docs.oracle.com/javafx/2/api/javafx/scene/layout/Region.html#prefWidth(double)>
Scott
More information about the openjfx-dev
mailing list