editor.setBrush(myBrush);
editor.setBrush(MapEditor.TOOL_PAINT, myBrush); editor.setCurrentBrush(MapEditor.TOOL_PAINT);
    public void actionPerformed(ActionEvent e) {        Object source = e.getSource();        if (source == okButton) {            createFromOptions();            editor.setBrush(myBrush);            dispose();        }        else if (source == bApply) {            createFromOptions();            editor.setBrush(myBrush);            bApply.setEnabled(false);        }        else if (source == bCancel) {            dispose();        }        else if (e.getActionCommand().equals(LOAD_BUTTON)) {            try {                openMap();                //mmv.setView(((CustomBrush)myBrush));            } catch (Exception e1) {                e1.printStackTrace();                JOptionPane.showMessageDialog(this,                        e1.toString(), "Load Brush",                        JOptionPane.WARNING_MESSAGE);            }            repaint();        }    }