myBrush = new RandomBrush(sel);
    private void createFromOptions() {        Tile t = null;        if (myBrush instanceof ShapeBrush) {            t = ((ShapeBrush)myBrush).getTile();        }        ShapeBrush sel = (ShapeBrush)brushes.getSelectedBrush();        sel.setSize(((Integer)brushSize.getValue()).intValue());        if (cbRandomBrush.isSelected()) {            RandomBrush randomBrush = new RandomBrush(sel);            myBrush = new RandomBrush(sel);            randomBrush.setRatio(                    sRandomAmount.getValue() / (double)sRandomAmount.getMaximum());        } else {            myBrush = new ShapeBrush(sel);        }        ((ShapeBrush)myBrush).setTile(t);        myBrush.setAffectedLayers(                ((Integer)affectLayers.getValue()).intValue());        update();    }