Layout issues

Randahl Fink Isaksen randahl at rockit.dk
Wed Oct 10 06:56:45 PDT 2012


Scott, in my experience this is not how JavaFX works in general. All my layoutChildren methods are only called when I change a property that directly or indirectly affects the layout, such as changing the text of a label or invoking requestLayout().

Your application must be doing something actively for this to happen, I believe.

Perhaps you could remove parts of your UI until you isolate the component causing the problem.

Randahl



On Oct 10, 2012, at 15:42 , Scott Palmer <swpalmer at gmail.com> wrote:

> Hi,
> 
> I have a custom container extending Pane that implements layoutChildren.  I've noticed that this method is called continuously even though my scene is static.  It's like something is always in the list of "dirty" nodes and is forcing a re-layout.   I don't understand this.  I've googled but I can't find a decent tutorial for implementing custom containers or custom layouts.
> 
> Part of the problem with my application is that nodes are not properly shrining when I remove content from within them,  they shrink a little, but not as much as they should.  I'm still debugging, but wonder if there is any insight into how the layout system works that I've missed somewhere?
> 
> Thanks,
> 
> Scott



More information about the openjfx-dev mailing list