Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Apr 1 '13 at 21:19

This question came from our site for professional and enthusiast programmers.

    
You answered your own question - use it when it you need its power, otherwise a standard, simpler layout will suffice. –  Nate W. Apr 1 '13 at 18:52
    
@Shakedown - May be not. I was also looking for points such as (1) (hypothetical) - Mig can be slow for "big projects". If you want a fast loading GUI, use the standard layout. (2) 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. –  david blaine Apr 1 '13 at 18:59

1 Answer 1

up vote 2 down vote accepted

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 and MigLayout.

  • Avoid the temptation to make a single layout manage the entire GUI.

  • Don't let a GUI designer dictate your GUI design.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.