brushSize.setEnabled(false);
    private void update() {        if (myBrush instanceof CustomBrush) {  // Custom brush            affectLayers.setEnabled(false);            cbRandomBrush.setEnabled(false);        } else if (myBrush instanceof RandomBrush) {  // Random brush            cbRandomBrush.setSelected(true);            sRandomAmount.setValue(                    (int)(((RandomBrush)myBrush).getRatio() * 100));        }        sRandomAmount.setEnabled(cbRandomBrush.isSelected());    }