Dialog shortcuts: RootPane vs Child(TextField)

Answered

Why root's shortcut override same shortcut of his child (TextField) when the last one is focused.

protected JComponent createCenterPanel() {
...
initShortcuts();
...
}

 

Undo for TextField doesn't work. Focus doesn't matter, system perform rootpane's action only.

1 comment
Comment actions Permalink

Default 'undo' action is a global action, it's not TextField-bound. If you assign any shortcut to a component or it's ancestor in component hierarchy, it will have precedence over global shortcut.

0

Please sign in to leave a comment.