String[] titles = {"Name", "Flag", "X", "Y"};
String[] titles = {"", "Name", "Flag", "X", "Y"};
    protected void init()    {        mainWindow = createBaseWindow(this);        mainWindow.setTitle(this.getDescription());        mainWindow.setIconImage(((ImageIcon) this.getIcon()).getImage());        //mainWindow.setSize(400, 500);        mainWindow.setResizable(false);        JPanel entry = new JPanel();        entry.setLayout(new GridLayout(17, 1));        ppuBox = new JComboBox();        ppuBox.addItem("8 (Door coords)");        ppuBox.addItem("32 (Map coords)");        ppuBox.setActionCommand("ppuBox");        ppuBox.addActionListener(this);        mainWindow.getContentPane()            .add(getLabeledComponent("Pixels per unit:", ppuBox),                BorderLayout.NORTH);        String[] titles = {"Name", "Flag", "X", "Y"};        JPanel labels = new JPanel();        labels.setLayout(new BoxLayout(labels, BoxLayout.X_AXIS));        for (int i = 0; i < titles.length; i++)        {            labels.add(getSizedJLabel(titles[i], i == 0 ? 25 : 5));        }        entry.add(labels);                DocumentListener xyListener =			new DocumentListener()			{				public void changedUpdate(DocumentEvent e)				{					for (int i = 0; i < tfs.length; i++)						for (int j = 0; j < tfs[i].length; j++)							if (e.getDocument().equals(tfs[i][j].getDocument())									&& tfs[i][2].getText().length() > 0									&& tfs[i][3].getText().length() > 0)							{								rbs[i].setSelected(true);			            		int x = Integer.parseInt(tfs[i][2].getText()),									y = Integer.parseInt(tfs[i][3].getText());			            		if (ppuBox.getSelectedIndex() == 0)			            		{			            			preview.setMapXY(x / 4, y / 4);				            		preview.setPreviewBoxXY(x, y);			            		}			            		else			            		{			            			preview.setMapXY(x,y);			            			preview.disablePreviewBox();			            		}			            		preview.remoteRepaint();			            		return;							}				}								public void insertUpdate(DocumentEvent e)				{					changedUpdate(e);				}				public void removeUpdate(DocumentEvent e)				{					changedUpdate(e);				}			};				ButtonGroup bg = new ButtonGroup();        for (int i = 0; i < tfs.length; i++)        {        	rbs[i] = new JRadioButton();        	rbs[i].addActionListener(this);        	bg.add(rbs[i]);            entry.add(getTeleportRow(tfs[i], rbs[i], bg, xyListener));        }                JPanel mapStuff = new JPanel();        mapStuff.setLayout(new BoxLayout(mapStuff, BoxLayout.Y_AXIS));        preview = new MapGraphics(this, 4, 4, 5, false, false, true);		preview.setPreferredSize(new Dimension(				(MapEditor.tileWidth * preview.getScreenWidth()) + 1,				(MapEditor.tileHeight * preview.getScreenHeight()) + 1));		mapStuff.add(preview);		seekButton = new JButton("Seek");		seekButton.addActionListener(this);		mapStuff.add(seekButton);        mainWindow.getContentPane().add(entry, BorderLayout.CENTER);        mainWindow.getContentPane().add(mapStuff, BorderLayout.LINE_START);        mainWindow.pack();    }