title: ScalaFX Button => How to define the action?
body: <p>I'm trying to definde the <strong>onAction</strong> accion for a <strong>Button</strong> done in <strong>scalafx</strong> but I can't make it to work.</p>
  
  <pre><code>package App.Desktop
  
  import javafx.event.EventHandler
  
  import scalafx.event.ActionEvent
  
  import scalafx.scene.control.Button
  
  class Window() {
  
    btn_YES.onAction = (event: ActionEvent) =&gt; 
     new EventHandler[ActionEvent] {
       override def handle(event: ActionEvent) {
          /*Do something*/
        }
      }
    }
  }
  </code></pre>
  
  <p>I've done this but I get an error </p>
  
  <pre><code>Error: type mismatch;
   found   : scalafx.event.ActionEvent =&gt; javafx.event.EventHandler[scalafx.event.ActionEvent]
   required: javafx.event.EventHandler[javafx.event.ActionEvent]
    btn_YES.onAction = (event: ActionEvent) =&gt; new EventHandler[ActionEvent]
  </code></pre>
  
  <p>I also tried to use the <code>javafx.event.ActionEvent</code> instead of <code>scalafx</code> but it doesn't work either.</p>
  
  <p>Any clue?</p>
  
  <p>Thanks</p>