I have no idea how come I have avoided using MiGLayout for my projects until now, but I have to say that I was stupid. 😉
Today I taught I give it a chance. As usual I kind of give every component a limited trial time (1-2 hours), to check how mature is. Usually if don’t succeed to make the component work or it does not give me the feeling that it will work nicely, I just remove it from the project and forget about it. So I did with MiG Layout.
Since I use Ivy in my latest project the first step in adding MiG Layout to the project was to define the dependency. Unfortunately that did not went too well at first try. The mvnrepository.com it does not have the latest version of the component, and unfortunately the artifacts are not separated from their dependencies (which are broken for 3.7 version) and to avoid downloading the whole internet, i decided to donwload the jars myself and put them in my shared repository and use that instead. With this in 5 minutes I had the dependecy resolved.
It was time to start coding. As a start I have downloaded the two best docs for the component: Quick Start Guide and the Cheat Sheet right from the site. I taught that if these docs don’t make me feel using this component than i’ll just drop it. Well, surprise these turned out to be the best documents a normal developer needs to check (not to read) in order to use the component.
After a short check I rapidly turned to the form I need to implement and started wondering on how to use the layout manager. As usual, it did not work from the first try, mostly because I am too lazy to read documentation, so after a few tries and aÂ short Google-ing for some examples (“mig layout example”) I managed to make my form look as I wanted to in less than 30 minutes (including Ivy configuration). And this my friend, is something.
I have to say that I am still amazed how simple it is to use it, and how much time can it spare you when developing GUI’s. In Swing making a complex form is a nightmare. Believe me I have tried every approach(every layout manager) but I could not find a solution which was easy and still covering the needs (which I have to say that are only basic needs).
Starting now, the GUI development is fun and fast (which is even better)Â again!!!! 😉
One more thing (which is really important): MiG Layout works with Swing, SWT and JavaFX.
Nice work Mikael Grev.