public void zoomOut() {
   component.setScale(component.getScale() * .95);
 }
 @Override
 public void stateChanged(ChangeEvent e) {
   component.setScale(slider.getValue() * 0.05);
 }
 public void zoomIn() {
   component.setScale(component.getScale() * 1.05);
 }
 public void setScale(double newScale) {
   component.setScale(newScale);
 }