How can I fill a Window?

68 Views Asked by At

I'm trying to create a simple interface which fills a resizable window, but the obvious tool for the job, FillPane, doesn't seem to be working for me.

I'm creating a window from the following BXML:

<Window title="Window" xmlns="org.apache.pivot.wtk" xmlns:bxml="http://pivot.apache.org/bxml">
    <FillPane orientation="VERTICAL">
        <ScrollPane>
            <ListView/>
        </ScrollPane>

        <PushButton buttonData="Button"/>
    </FillPane>
</Window>

But the FillPane only covers a tiny portion of the Window:

screenshot

I wouldn't have thought I could have made an error in something so simple, but clearly something isn't working as I expected.

I'm using Pivot 2.0.3 and Java 1.7 update 51 on Windows 7.

1

There are 1 best solutions below

1
Braiba On BEST ANSWER

FillPane just makes sure that its children fill all of the space it occupies; it doesn't actually make sure the pane itself fills its parent.

Adding the maximized="true" attribute to your Window tag should give the result you're after.