void (ChangeEvent e) { if (myAdjusting) return; myAdjusting = true; boolean b = e.getSource() == myOpacitySpinner; if (b) { int value = (Integer)myOpacitySpinner.getValue(); myOpacitySpinner.setValue(MathUtil.clamp(value, 0, 100)); myOpacitySlider.setValue(value); } else { myOpacitySpinner.setValue(myOpacitySlider.getValue()); } myAdjusting = false; opacityChanged(); }