Make two different panels for each column, with one column in each panel.
It gets a bit painful sometimes to work with layered panels in MigLayout, but absent any specific problems, this is the easiest.
Pergunta
I want a 2-column layout where I can specify which column to insert the next element into. It needs to grow automatically -- I don't want to specify the row.
So, for example, I want to say:
And the resulting table would look like this:
[1][1]
[1][1]
[1][1]
[1]
What's the easiest way to do this with MigLayout?
Solução
Make two different panels for each column, with one column in each panel.
It gets a bit painful sometimes to work with layered panels in MigLayout, but absent any specific problems, this is the easiest.
Outras dicas
Use GridLayout
like:
GridLayout layout=new GridLayout(4, 2);