code: private void pauseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pauseButtonActionPerformed
          switch (pauseButton.getText()) {
  			case "Pause":
  				_worker.pause();
  				pauseButton.setText("Resume");
  				break;
  			case "Resume":
  				_worker.resume();
  				pauseButton.setText("Pause");
  				break;
  			default:
  		}
      }
docs: GEN-LAST:event_origImagePanelComponentResized