title: javafx how to request focus on the table cell?
body: <p>I have a editable TableView which validates the input on the tablecells. If user types invalid input then an alert box will be shown with the error message. however when the alert box is shown, the TableCell and the TableView loses focus. The code below describes the scenario.</p>
  
  <pre><code>tableColumn.setOnEditCommit(evt -&gt; {
      boolean inputValid = // do validation;
      if(!inputValid) {
          int row = tableView.getEditingCell().getRow();
          Alert alert = new Alert(AlertType.ERROR);
          alert.setContentText("Invalid input");
          alert.initModality(Modality.WINDOW_MODAL);
          alert.initOwner(tableView.getScene().getWindow());
          alert.showAndWait();
          tableView.requestFocus(); // get back focus
          tableView.edit(row, tableColumn);
      }
  });
  </code></pre>
  
  <p>this grabs the focus back to the TableView after showing the alert box but the <strong>TextField inside the TableCell does not have focus</strong>. how to accomplish this? and by the way, im using the <a href="https://gist.github.com/abhinayagarwal/9383881" rel="nofollow">EditingCell</a> TableCell instead of the <a href="https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/cell/TextFieldTableCell.html" rel="nofollow">TextFieldTableCell</a>.</p>