void (ActionEvent e) { if (myProgressButton.getText().equals("Start")) { myProgressBar1.setIndeterminate(true); myProgressButton.setText("Stop"); } else { myProgressBar1.setIndeterminate(false); myProgressButton.setText("Start"); } }