View unanswered posts | View active topics It is currently Sun May 28, 2017 7:42 am

Reply to topic  [ 1 post ] 
Author Message

Joined: Sat Jul 26, 2008 5:05 am
Posts: 1
Post MigHelper
I've recently coded a project (, release 11 available shortly) using GridBagLayout. The limitations of this layout manager became very apparent when I recently added dynamic look and feel changing to the app, and the cross-platform discrepancies were too many to endure. Long and short, I switched to MigLayout, and I am very happy.

As part of my learning curve for MigLayout I've written a class which I find very useful, and I believe others may as well. Its called MigHelper - (I'd attach it, but the forum won't allow me to attach any files at all...).

The usage of the class is very straightforward, and hides some of the complexities of MigLayout while still providing all its powerful layout capabilities. It chains nicely, providing very easy to use, easy to read code ie:

private Container layoutAContainer() {
  MigHelper mh = new MigHelper();

  // Set any layout constraints first

  // adds a row, from left to right

  // layout other components as required

  return mh.getContainer(); // a JPanel, using the blank constructor

I hope others find this class as useful as I have. Thanks for the great layout manager.


Sat Jul 26, 2008 5:27 am
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.