It seems to be easier to use and more feature rich than standard swing layouts. It looks like a do it all replacement for all standard layouts. If you are making simple code to just show the time in a window, then MigLayout is probably not useful. But, if you are making a flight cockpit panel, then MigLayout might be the best. However, even if your project is “complex” (like the flight panel example), how do you decide if you can do it well with the standard layouts instead of Mig ?
How do you know when you should use MigLayout and when you should not ? Is it so good that one should use it right away for big projects without even considering the standard layouts ?
These are the kind of points I am looking for –
(1) (fictional) – Mig can be slow for “big projects”. If you want a fast loading GUI, then use the standard layout.
(2) (fictional) – Mig is still not as mature a project as the standard layouts. If you are making a mission critical app, i’d suggest not using Mig.
2
Swing developers should know the basic layouts and master at least one powerful layout. MigLayout
is one such tool. The problem then becomes, “When should I use a powerful layout?” The answer is “When no simpler one will do.”
-
Use simple layouts when possible.
-
Nest simple layouts for more complex effects.
-
Isolate complex layouts, such as
GroupLayout
andMigLayout
. -
Avoid the temptation to make a single layout manage the entire GUI.
-
Don’t let a GUI designer dictate your GUI design.