When using MigLayout, how would a 3rd int parameter to `add` affect layout?
-
28-10-2019 - |
Question
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
Solution
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,
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow