There is no equivalent in SWT, but you can try using the following lists for both components:
public class OppositeAwareFocusListener implements FocusListener {
Widget opposite;
public void focusGained(FocusEvent e) {
..
}
public void focusLost(FocusEvent e) {
this.opposite = e.widget;
}
}
source
share