c.gridy += 1; layerPanel.add(tileInstancePropertiesButton, c);
    private void createData() {        dataPanel = new JPanel(new BorderLayout());        //navigation and tool options        // TODO: the minimap is prohibitively slow, need to speed this up        // before it can be used        miniMap = new MiniMapViewer();        //miniMap.setMainPanel(mapScrollPane);        JScrollPane miniMapSp = new JScrollPane();        miniMapSp.getViewport().setView(miniMap);        miniMapSp.setMinimumSize(new Dimension(0, 120));        // Layer table        layerTable = new JTable(new LayerTableModel(currentMap));        layerTable.getColumnModel().getColumn(0).setPreferredWidth(32);        layerTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);        layerTable.getSelectionModel().addListSelectionListener(this);        // Opacity slider        opacitySlider = new JSlider(0, 100, 100);        opacitySlider.addChangeListener(this);        JLabel opacityLabel = new JLabel(                Resources.getString("dialog.main.opacity.label"));        opacityLabel.setLabelFor(opacitySlider);        JPanel sliderPanel = new JPanel();        sliderPanel.setLayout(new BoxLayout(sliderPanel, BoxLayout.X_AXIS));        sliderPanel.setBorder(BorderFactory.createEmptyBorder(0, 3, 0, 3));        sliderPanel.add(opacityLabel);        sliderPanel.add(opacitySlider);        sliderPanel.setMaximumSize(new Dimension(Integer.MAX_VALUE,                    sliderPanel.getPreferredSize().height));        // Layer buttons        AbstractButton layerAddButton = new TButton(addLayerAction);        mapEventAdapter.addListener(layerAddButton);        JPanel layerButtons = new JPanel();        layerButtons.setLayout(new GridBagLayout());        GridBagConstraints c = new GridBagConstraints();        c.fill = GridBagConstraints.BOTH;        c.weightx = 1;        layerButtons.add(layerAddButton, c);        layerButtons.add(new TButton(moveLayerUpAction), c);        layerButtons.add(new TButton(moveLayerDownAction), c);        layerButtons.add(new TButton(cloneLayerAction), c);        layerButtons.add(new TButton(deleteLayerAction), c);        layerButtons.setMaximumSize(new Dimension(Integer.MAX_VALUE,                    layerButtons.getPreferredSize().height));        // Edit history        /*        JScrollPane editSp = new JScrollPane();        editHistoryList = new JList();        editSp.setHorizontalScrollBarPolicy(                JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);        editSp.getViewport().setView(editHistoryList);        */        JPanel layerPanel = new JPanel();        layerPanel.setLayout(new GridBagLayout());        layerPanel.setPreferredSize(new Dimension(120, 120));        c = new GridBagConstraints();        c.insets = new Insets(3, 0, 0, 0); c.weightx = 1; c.weighty = 0;        c.fill = GridBagConstraints.BOTH;        c.gridx = 0; c.gridy = 0;        //layerPanel.add(miniMapSp, c);        c.weighty = 0; c.gridy += 1;        layerPanel.add(sliderPanel, c);        c.weighty = 1; c.gridy += 1;        layerPanel.add(new JScrollPane(layerTable), c);        c.weighty = 0; c.insets = new Insets(0, 0, 0, 0); c.gridy += 1;        layerPanel.add(layerButtons, c);        /*        c.weighty = 0.25; c.insets = new Insets(3, 0, 0, 0); c.gridy += 1;        layerPanel.add(editSp, c);        */        // Create paint panel        TilePalettePanel tilePalettePanel = new TilePalettePanel();        JPanel brushesPanel = new JPanel();        JTabbedPane paintPanel = new JTabbedPane();        paintPanel.add("Palette", tilePalettePanel);        paintPanel.add("Brushes", brushesPanel);        paintPanel.setSelectedIndex(1);        JToolBar tabsPanel = new JToolBar();        tabsPanel.add(paintPanel);        dataPanel.add(layerPanel);    }