Swing dynamic(auto) fit-layouting
问题 Considering 100(dynamic) JLabel Object, and I want to show them inside a resizable JPanel . Currently I use grid bag layout (2 columns and 50 rows), but when user resizes and expands the form, I want to have(for example) 4 columns and 25 rows, and same for small form(1 column, and 100 rows), in other way fill up the whole panel(no any white spaces). I know this is should be done manually, currently I redraw(repaint) all members once user resize the form, but I just was wondering if there is