customPanel.setLayout(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); c.anchor = GridBagConstraints.NORTH; c.fill = GridBagConstraints.NONE; c.weightx = 2; c.weighty = 2; customPanel.add(miniSp, c); c.weightx = 1; c.weighty = 1; c.gridx=2; customPanel.add(bCreate, c); c.gridy=1; customPanel.add(bLoad, c); c.gridx=0; c.gridy=2; customPanel.add(layerTable, c);
    private JPanel createCustomPanel() {        JPanel customPanel = new JPanel();                MiniMapViewer mmv = new MiniMapViewer();        JScrollPane miniSp = new JScrollPane();        miniSp.getViewport().setView(mmv);                                        return customPanel;    }