The current implementation of org.openide.awt.QuickSearch dismiss the search field, after it loses focus. It's removed from the UI, when the user changes the context and selects a different component.
However, this automatic behavior is not practical for some usages (e.g. options dialog). Therefore, we should add a way how to turn this behavior off.
Created attachment 122162 [details]
The proposed patch
Please review the simple API change...
Seems good to me. In the case of a focusLost event, if the focus lost is temporary or the dismissOnFocusLost flag is set to false then the focus should return to the search text-field. So please add one line before the return statement: searchTextField.requestFocus();
If this is added it works as expected, at least for the options case :)
I'm abandoning this API change, since there's a similar issue #215833, which solves the problem in a more suitable way for use in Options dialog.