Reputation: 10778
I have a Container
which will include a varying number of pictures (ScaledImageLabel
), ordered vertically. I'd like that the pictures resize so that they never get hidden: they resize so that collectively, they take up te available vertical space.
I tried different layouts but can't figure how to get this result?
Upvotes: 1
Views: 41
Reputation: 52760
I would suggest a grid layout with a non-scrollable container so you would do something like this:
parentForm.setScrollableY(false);
parentForm.setLayout(new GridLayout(getComponentCount(), 1));
Upvotes: 1