How would you go about getting a decent looking gui generated when you don't know how many components you will have and how big they will be?
A user, for instance, enters how many textfields they want and which of those textfields are grouped in bordered panels and the program generates this.
I've been using GridLayout, but the problem is that it makes all cells of the same width and height, which is fine when all components have the same size, but when I, for example, have a textfield and a bordered panel with multiple fields, either the textfield gets stretched out or the panel is squeezed.
I would like all components to have their minimum size, but still, you know, usable.
Example of how it is now, using GridLayout, all fields are normal, one-line JTextFields where the panel titled date is totally squeezed (it has three fields in it) and the first level fields are way to big. Anyone have any pointers?