lpe.repaint();
if (screenSelector.getSelectedIndex() == 1) { cacheArrImg(); lpe.repaint(); }
    public void actionPerformed(ActionEvent ae)    {        if (ae.getActionCommand().equals("mapSelector")            || ae.getActionCommand().equals("subPalSelector"))        {            if (screenSelector.getSelectedIndex() != 0)            {                arrImg = new BufferedImage(arrangementEditor.getWidth(),                    arrangementEditor.getHeight(), BufferedImage.TYPE_INT_RGB);                screenSelector.removeActionListener(this);                int realSelectedScreen = screenSelector.getSelectedIndex();                screenSelector.setSelectedIndex(0);                arrangementEditor.paint(arrImg.getGraphics());                screenSelector.setSelectedIndex(realSelectedScreen);                screenSelector.addActionListener(this);            }        }        super.actionPerformed(ae);        if (ae.getActionCommand().equals("subPalSelector"))        {            tileSelector.repaint();            (screenSelector.getSelectedIndex() == 0                ? (JComponent) arrangementEditor                : (JComponent) lpe).repaint();        }        else if (ae.getActionCommand().equals("paletteEditor"))        {            lpe.repaint();        }        else if (ae.getActionCommand().equals("mapSelector"))        {            mainWindow.getContentPane().invalidate();            tileSelector.invalidate();            tileSelector.resetPreferredSize();            tileSelector.validate();            tileSelector.repaint();            arrangementEditor                .setVisible(screenSelector.getSelectedIndex() == 0);            lpe.setVisible(screenSelector.getSelectedIndex() == 1);            mainWindow.getContentPane().validate();        }    }