public JComponent createGrouping()
{
JTabbedPane tabbedPane = new JTabbedPane();
// Ungrouped
MigLayout ugM = new MigLayout("", "[]push[][][]", "");
JPanel ugPanel = createTabPanel(ugM);
ugPanel.add(createButton("Help"));
ugPanel.add(createButton("< Back"), "");
ugPanel.add(createButton("Forward >"), "gap push");
ugPanel.add(createButton("Apply"), "gap unrel");
ugPanel.add(createButton("Cancel"), "gap unrel");
// Grouped Components
MigLayout gM = new MigLayout("nogrid, fillx");
JPanel gPanel = createTabPanel(gM);
gPanel.add(createButton("Help"), "sg");
gPanel.add(createButton("< Back"), "sg,gap push");
gPanel.add(createButton("Forward >"), "sg");
gPanel.add(createButton("Apply"), "sg,gap unrel");
gPanel.add(createButton("Cancel"), "sg,gap unrel");
// Grouped Columns
MigLayout gcM = new MigLayout("", "[sg,fill]push[sg,fill][sg,fill]unrel[sg,fill]unrel[sg,fill]", "");
JPanel gcPanel = createTabPanel(gcM);
gcPanel.add(createButton("Help"));
gcPanel.add(createButton("< Back"));
gcPanel.add(createButton("Forward >"));
gcPanel.add(createButton("Apply"));
gcPanel.add(createButton("Cancel"));
// Ungrouped Rows
MigLayout ugrM = new MigLayout(); // no "sg" is the only difference to next panel
JPanel ugrPanel = createTabPanel(ugrM);
ugrPanel.add(createLabel("File Number:"));
ugrPanel.add(createTextField(30), "wrap");
ugrPanel.add(createLabel("BL/MBL number:"));
ugrPanel.add(createTextField(7), "split 2");
ugrPanel.add(createTextField(7), "wrap");
ugrPanel.add(createLabel("Entry Date:"));
ugrPanel.add(createTextField(7), "wrap");
ugrPanel.add(createLabel("RFQ Number:"));
ugrPanel.add(createTextField(30), "wrap");
ugrPanel.add(createLabel("Goods:"));
ugrPanel.add(createCheck("Dangerous"), "wrap");
ugrPanel.add(createLabel("Shipper:"));
ugrPanel.add(createTextField(30), "wrap");
ugrPanel.add(createLabel("Customer:"));
ugrPanel.add(createTextField(""), "split 2,growx");
ugrPanel.add(createButton("..."), "width 60px:pref,wrap");
ugrPanel.add(createLabel("Port of Loading:"));
ugrPanel.add(createTextField(30), "wrap");
ugrPanel.add(createLabel("Destination:"));
ugrPanel.add(createTextField(30), "wrap");
// Grouped Rows
MigLayout grM = new MigLayout("", "[]", "[sg]"); // "sg" is the only difference to previous panel
JPanel grPanel = createTabPanel(grM);
grPanel.add(createLabel("File Number:"));
grPanel.add(createTextField(30),"wrap");
grPanel.add(createLabel("BL/MBL number:"));
grPanel.add(createTextField(7),"split 2");