title: JavaFX decoupling event handling and logic from controller
body: <p>I want to know how to structure JavaFX application espicially, event handling
  I need a way to process event outside a Javafx controller.</p>
  
  <p>Let's Suppose that i have:</p>
  
  <p>a person.fxml file with code </p>
  
  <p>and PersonController that controlls that file</p>
  
  <pre><code> public PersonController implements Initializable{
      @FXML
      private TextField textField1 ; 
  
  @Override
      public void initialize(URL location, ResourceBundle resources) {
  
  
      }
  
  }
  </code></pre>
  
  <p>i want make some thing like </p>
  
  <pre><code>public class EventHandler  {
  // Process all the person.fxml and PersonController logic her
  }
  </code></pre>
  
  <p>So, how i can acheive that so, the PersonController can be stupid.</p>