title: JavaFx - Set two 'setOnAction' to the same button
body: <p>I get EventHandler from another class, and I want to set this EventHandler and other ActionEvent to the same button. It is possible?</p>
  
  <p>The code is following.
  The button is: "btnAdd".</p>
  
  <pre><code>public void addActionListener(EventHandler&lt;ActionEvent&gt; eventHandlerSetNotSave){
      btnAdd.setOnAction((e)-&gt; {
          FileChooser fileChooser = new FileChooser();
          fileChooser.setTitle("Open Resource File");
          FileChooser.ExtensionFilter extFilter = new FileChooser.ExtensionFilter("pictures file format",
                  "*.TIF","*.JPG","*.PNG","*.GIF","*.JEPG");
          fileChooser.getExtensionFilters().addAll(extFilter);
          File file = fileChooser.showOpenDialog(null);
  
          if (file != null &amp;&amp;
                  url.equals(emptyImageUrl)? true:alertMessageWarning("The viseme will change, and previous viseme will be delete.")) {
              setImage("file:"+file.toString());
              changeAfterSaved=false;
          }
      });
      btnAdd.setOnAction(eventHandlerSetNotSave);
  
      btnDelete.setOnAction((e)-&gt; {
          changeAfterSaved=true;
          setImage(emptyImageUrl);
      });
  }
  </code></pre>