The Shoe Shiner
The Shoe Shiner

Reputation: 756

Swing UI performance considerations - nested layouts vs single grid

Basic question is are there serious performance differences between nesting Swing layouts vs using a single parent complex grid-based layout (e.g. FormLayout or MigLayout)?

For example, a layout like this:

enter image description here

Could probably be represented with a single parent FormLayout with ~6 main columns (+7 "gap" columns if you use FormLayout).

However one could also use a more nested approach, with a single column parent, and ~5 rows of children, each with its own layout (perhaps another grid, or something simpler).

In my opinion the nesting makes the child layouts a little easier to adjust and work with, especially if you expect changes in the future, but the single grid parent is obviously more concise.

So to re-state my question - Does nesting the layouts have serious performance impacts? I would assume that for minor nesting like my example it would not (correct me if im wrong) but would the approach change if you needed many more levels of nesting?

Or is there a best-practice to all this that Im missing (I have not found one)?

Upvotes: 0

Views: 41

Answers (0)

Related Questions