I'm looking for the following behaviour in a JPanel Layout (Swing): basically it would arrange the components in a Vertical way, one bellow each other. When the components can't fit vertically in the container, it should add the next one in a new row. This would continue dinamically, adding new rows as needed.
It would look likes this, after adding 3 labels:
+--------------------------+
| label1 |
| label2 |
| label3 |
+--------------------------+
After adding: 2 more labels:
+--------------------------+
| label1 label4 |
| label2 label5 |
| label3 |
+--------------------------+
Finally, after adding 2 more labels it would look like this:
+--------------------------+
| label1 label4 label7 |
| label2 label5 |
| label3 label6 |
+--------------------------+
Is this behaviour possible to achieve with one of the current Layouts? or should I create one myself? How would you solve this solution?