public JComponent createDocking()
{
JTabbedPane tabbedPane = new JTabbedPane();
JPanel p1 = createTabPanel(new MigLayout("fill"));
p1.add(createPanel("1. North"), "north");
p1.add(createPanel("2. West"), "west");
p1.add(createPanel("3. East"), "east");
p1.add(createPanel("4. South"), "south");
String[][] data = new String[20][6];
for (int r = 0; r < data.length; r++) {
data[r] = new String[6];
for (int c = 0; c < data[r].length; c++)
data[r][c] = "Cell " + (r + 1) + ", " + (c + 1);
}
JTable table = new JTable(data, new String[] {"Column 1", "Column 2", "Column 3", "Column 4", "Column 5", "Column 6"});
p1.add(new JScrollPane(table), "grow");
JPanel p2 = createTabPanel(new MigLayout("fill", "[c]", ""));
p2.add(createPanel("1. North"), "north");
p2.add(createPanel("2. North"), "north");
p2.add(createPanel("3. West"), "west");
p2.add(createPanel("4. West"), "west");
p2.add(createPanel("5. South"), "south");
p2.add(createPanel("6. East"), "east");
p2.add(createButton("7. Normal"));
p2.add(createButton("8. Normal"));
p2.add(createButton("9. Normal"));
JPanel p3 = createTabPanel(new MigLayout());
p3.add(createPanel("1. North"), "north");
p3.add(createPanel("2. South"), "south");
p3.add(createPanel("3. West"), "west");
p3.add(createPanel("4. East"), "east");
p3.add(createButton("5. Normal"));
JPanel p4 = createTabPanel(new MigLayout());
p4.add(createPanel("1. North"), "north");
p4.add(createPanel("2. North"), "north");
p4.add(createPanel("3. West"), "west");
p4.add(createPanel("4. West"), "west");
p4.add(createPanel("5. South"), "south");
p4.add(createPanel("6. East"), "east");
p4.add(createButton("7. Normal"));
p4.add(createButton("8. Normal"));
p4.add(createButton("9. Normal"));
JPanel p5 = createTabPanel(new MigLayout("fillx", "[c]", ""));
p5.add(createPanel("1. North"), "north");
p5.add(createPanel("2. North"), "north");
p5.add(createPanel("3. West"), "west");
p5.add(createPanel("4. West"), "west");
p5.add(createPanel("5. South"), "south");
p5.add(createPanel("6. East"), "east");
p5.add(createButton("7. Normal"));
p5.add(createButton("8. Normal"));
p5.add(createButton("9. Normal"));
JPanel p6 = createTabPanel(new MigLayout("fill", "", ""));
Random rand = new Random();
String[] sides = {"north", "east", "south", "west"};
for (int i = 0; i < 20; i++) {
int side = rand.nextInt(4);