I want to know is it possible to add a component to a MiGLayout without giving it absolute size, but instructing it what it's initial size has to be.


I have a GUI in which I have to draw several hundrer of such components on screen and the time it takes for layout manager to figure out the size of the each component can get loading time up to 10 seceonds which is obviously too much. Therefore, I'd like to tell the manager what the inital size is so it doesn't have to resize the component a bilion times before it hits the right size. The impotant thing is that those components (JTextAreas to be precise) can have their text amount changed by user, which in turn modifies their height.

So, create component with defined height and width, but then, when it's drawn simply remove the limitation and allow it to change.