mapTypeChooser.addItem("Hexagonal");
    private void init() {        // Create the primitives        mapWidth = new IntegerSpinner(64, 1);        mapHeight = new IntegerSpinner(64, 1);        tileWidth = new IntegerSpinner(35, 1);        tileHeight = new IntegerSpinner(35, 1);        // Map size fields        JPanel mapSize = new VerticalStaticJPanel();        mapSize.setLayout(new GridBagLayout());        mapSize.setBorder(BorderFactory.createCompoundBorder(                    BorderFactory.createTitledBorder("Map size"),                    BorderFactory.createEmptyBorder(0, 5, 5, 5)));        GridBagConstraints c = new GridBagConstraints();        c.anchor = GridBagConstraints.EAST;        c.fill = GridBagConstraints.NONE;        c.insets = new Insets(5, 0, 0, 0);        mapSize.add(new JLabel("Width: "), c);        c.gridy = 1;        mapSize.add(new JLabel("Height: "), c);        c.fill = GridBagConstraints.HORIZONTAL;        c.gridx = 1; c.gridy = 0; c.weightx = 1;        mapSize.add(mapWidth, c);        c.gridy = 1;        mapSize.add(mapHeight, c);        // Tile size fields        JPanel tileSize = new VerticalStaticJPanel();        tileSize.setLayout(new GridBagLayout());        tileSize.setBorder(BorderFactory.createCompoundBorder(                    BorderFactory.createTitledBorder("Tile size"),                    BorderFactory.createEmptyBorder(0, 5, 5, 5)));        c.gridx = 0; c.gridy = 0; c.weightx = 0;        c.fill = GridBagConstraints.NONE;        tileSize.add(new JLabel("Width: "), c);        c.gridy = 1;        tileSize.add(new JLabel("Height: "), c);        c.fill = GridBagConstraints.HORIZONTAL;        c.gridx = 1; c.gridy = 0; c.weightx = 1;        tileSize.add(tileWidth, c);        c.gridy = 1;        tileSize.add(tileHeight, c);        // OK and Cancel buttons        JButton okButton = new JButton("OK");        JButton cancelButton = new JButton("Cancel");        okButton.addActionListener(this);        cancelButton.addActionListener(this);        JPanel buttons = new VerticalStaticJPanel();        buttons.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));        buttons.setLayout(new BoxLayout(buttons, BoxLayout.X_AXIS));        buttons.add(Box.createGlue());        buttons.add(cancelButton);        buttons.add(Box.createRigidArea(new Dimension(5, 0)));        buttons.add(okButton);        // Map type and name inputs        mapTypeChooser = new JComboBox();        mapTypeChooser.addItem("Orthogonal");        mapTypeChooser.addItem("Isometric");        // TODO: Re-enable these when their views are implemented        //mapTypeChooser.addItem("Oblique");        //mapTypeChooser.addItem("Hexagonal");        mapName = new JTextField("Untitled");        JPanel miscPropPanel = new VerticalStaticJPanel();        miscPropPanel.setLayout(new GridBagLayout());        miscPropPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0));        c.gridx = 0; c.gridy = 0; c.weightx = 0;        c.fill = GridBagConstraints.NONE;        miscPropPanel.add(new JLabel("Map name: "), c);        c.gridy = 1;        miscPropPanel.add(new JLabel("Map type: "), c);        c.fill = GridBagConstraints.HORIZONTAL;        c.gridx = 1; c.gridy = 0; c.weightx = 1;        miscPropPanel.add(mapName, c);        c.gridy = 1;        miscPropPanel.add(mapTypeChooser, c);        // Putting two size panels next to eachother        JPanel sizePanels = new JPanel();        sizePanels.setLayout(new BoxLayout(sizePanels, BoxLayout.X_AXIS));        sizePanels.add(mapSize);        sizePanels.add(Box.createRigidArea(new Dimension(5, 0)));        sizePanels.add(tileSize);        // Main panel        JPanel mainPanel = new JPanel();        mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.PAGE_AXIS));        mainPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));        mainPanel.add(miscPropPanel);        mainPanel.add(sizePanels);        mainPanel.add(Box.createRigidArea(new Dimension(0, 5)));        mainPanel.add(Box.createGlue());        mainPanel.add(buttons);        getContentPane().add(mainPanel);        getRootPane().setDefaultButton(okButton);    }