Is it possible in JavaFX to change the focus traversal policy, like in AWT?
Because the traversal order for two of my HBoxes is wrong.
We're using JavaFX event filters for this, e.g.:
cancelButton.addEventFilter(KeyEvent.KEY_PRESSED, new EventHandler() {
@Override
public void handle(KeyEvent event) {
if (event.getCode() == KeyCode.TAB && event.isShiftDown()) {
event.consume();
getDetailsPane().requestFocus();
}
}
});
The event.consume() suppresses the default focus traversal, which otherwise causes trouble when calling requestFocus().