public void propertyChange(final PropertyChangeEvent ev) {
EventQueue.invokeLater(new Runnable() {
public void run() {
Component focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
if (focusOwner != null && isChildComponentInvisible(splitPane, focusOwner)) {
FocusTraversalPolicy focusTraversalPolicy = getFocusTraversalPolicy();
Component focusedComponent = focusTraversalPolicy.getComponentAfter(HomePane.this, focusOwner);
if (focusedComponent == null) {
focusedComponent = focusTraversalPolicy.getComponentBefore(HomePane.this, focusOwner);
}
focusedComponent.requestFocusInWindow();
}
controller.setVisualProperty(dividerLocationProperty, ev.getNewValue());
}