
Difference between hidemode 1 and hidemode 2 ??
I can't figure out what the difference is between hidemode 1 and 2.
The documentation says:
1 - The size of an invisible component will be set to 0, 0.
2 - The size of an invisible component will be set to 0, 0 and the gaps will also be set to 0 around it.
I don't see any difference between these two modes. All gaps seem to be present, regardless of whether it's hidemode 1 or 2.
At first, I just had three components in a row:
Code:
c.setLayout(new MigLayout("debug, hidemode 2"));
c.add(new JLabel("Hello world"));
JLabel hideme = new JLabel("HIDE ME");
hideme.setVisible(false);
c.add(hideme, "gapright 50");
c.add(new JLabel("Hello 2 world"), "wrap");
Then I thought maybe it didn't work because they have to be in a split cell:
Code:
c.setLayout(new MigLayout("debug, hidemode 2"));
c.add(new JLabel("Hello world"), "split 3");
JLabel hideme = new JLabel("HIDE ME");
hideme.setVisible(false);
c.add(hideme, "gapright 50");
c.add(new JLabel("Hello 2 world"), "wrap");
Then I thought perhaps it will remove row gaps if the invisible component is on it's own row. That didn't matter either. Which gaps does hidemode 2 remove?
Thanks!