bOk = new JButton("OK"); bOk.addActionListener(this); mainPanel.add(bOk);
mainPanel.add(Box.createRigidArea(new Dimension(0, 5))); mainPanel.add(buttons);
    private void init() {        tabs = new JTabbedPane(JTabbedPane.TOP);        tabs.addTab("Tileset", createTilesetPanel());        tabs.addTab("Tiles", createTilePanel());        tabs.addTab("Images", createImagePanel());        JPanel mainPanel = new JPanel();        mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));        mainPanel.add(tabs);        bOk = new JButton("OK");        bOk.addActionListener(this);        mainPanel.add(bOk);        getContentPane().add(mainPanel);        getRootPane().setDefaultButton(bOk);    }