Posted by Patrick Kik at 19:11 on Wednesday 16 March
I’m not a fan of developing user interfaces and that’s an understatement. I really hate the Swing layout managers. But then I discovered MiGLayout!
With MiGLayout it’s really easy to create a GUI. Here’s a short example (from their website):
To give you an idea about how the layout manager works, below is the source code for the Quick Start panel. Note that all gaps (white space) is added automatically. The gaps will be correct for the platform it is run. Even the white space around the components (border) is automatic!
JPanel panel = new JPanel(new MigLayout());
panel.add(firstNameLabel);
panel.add(firstNameTextField);
panel.add(lastNameLabel, "gap unrelated");
panel.add(lastNameTextField, "wrap");
panel.add(addressLabel);
panel.add(addressTextField, "span, grow");
Take a look at the demo applications to see a lot of examples using MiGLayout.












