rtheunissen
rtheunissen

Reputation: 7435

When using MigLayout, how would a 3rd int parameter to `add` affect layout?

For example:

layeredPane.setLayout(new MigLayout());
layeredPane.add(component, "pos 50 50, width 100, height 100", 0);

The 0 in this case does affect the component's layering, but I can't seem to figure out exactly how. I would like to overlay components, but because there is the second layout constraint for the MigLayout, I can't combine layering and positioning as usual with a JLayeredPane. Thanks

Upvotes: 3

Views: 542

Answers (1)

mKorbel
mKorbel

Reputation: 109823

JLayeredPane haven't got implemented LayoutManager then there you have to setBounds or setSize by default, first parameter in constructor is used for JComponents, second for Type of Layer,

Upvotes: 2

Related Questions