J
John F.
I need to fill a JPanel container with an array of smaller, square
JPanels. They need to flow vertically down a column until they reach
the bottom of the JPanel container then start again in a new column
immediately to the right. I'll not know how many smaller JPanels I
will use until I query a database (they are contacts goint into a
contact list grid.)
For instance, if there were 22 smaller panels:
1 6 11 16 21
2 7 12 17 22
3 8 13 18
4 9 14 19
5 10 15 20
Preferably, if the container were to be resized where the height was
less, then a row would be subtracted off and a new column created:
1 5 9 13 17 21
2 6 10 14 18 22
3 7 11 15 19
4 8 12 16 20
I'd really appreciate some advice before I reinvent the wheel.
JPanels. They need to flow vertically down a column until they reach
the bottom of the JPanel container then start again in a new column
immediately to the right. I'll not know how many smaller JPanels I
will use until I query a database (they are contacts goint into a
contact list grid.)
For instance, if there were 22 smaller panels:
1 6 11 16 21
2 7 12 17 22
3 8 13 18
4 9 14 19
5 10 15 20
Preferably, if the container were to be resized where the height was
less, then a row would be subtracted off and a new column created:
1 5 9 13 17 21
2 6 10 14 18 22
3 7 11 15 19
4 8 12 16 20
I'd really appreciate some advice before I reinvent the wheel.