Randahl Fink Isaksen
randahl at rockit.dk
Thu Oct 4 06:09:13 PDT 2012
Tom, the problem is, extending Pane directly is a lot of work. Pane does not implement a layout strategy and therefore does not implement computePrefWidth and computePrefHeight; consequently if you just nest a lot of Panes inside one another, none knows anything about size.
So, instead of extending Pane directly I have found it much more useful to extend one of the subclasses which has a layout strategy such as BorderPane, GridPane, etc. And up until this point I have not yet seen a layout that could not be implemented as an (arguably bloated) tree of subclasses of Pane.
Once you extend, say, BorderPane, invoking setPrefSize(double, double) *does* have an effect.
In short: Either invoke setSize and ensure
On Oct 4, 2012, at 14:51 , Tom Eugelink <tbee at tbee.org> wrote:
> Not seeing my post from this morning appear, so I'm reposting but without the attachment this time.
> I've posted a thread on the JavaFX forums with problems I run into when writing a Google Calendar style control. I could use advice on how to best do this nested Panes layout.
More information about the openjfx-dev