public void stateChanged(ChangeEvent evt){
  int scale=slider.getValue();
  value.setText("x" + String.valueOf(scale));
  size.setText("Image Size: " + (width * scale) + " x "+ (height * scale)+ " pixels");
  preview.repaint();
}

public void stateChanged ( ChangeEvent evt ) { int scale = slider . getValue ( ) ; value . setText ( "x" + String . valueOf ( scale ) ) ; size . setText ( "Image Size: " + ( width * scale ) + " x " + ( height * scale ) + " pixels" ) ; preview . repaint ( ) ; }
monitor changes to the scale slider .
