You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hmm, for me it works fine 😕
What OS and Java version do you use?
How do you focus the textfield?
This works only if you use the TAB key to move focus to textfield.
If you click into a textfield, the caret is placed at the clicked location and no text is selected.
Okay, good to know. If you never ever clicked into that textfield via mouse (and only used tab) this works as expected. But if you once clicked into that textfield and later on jump in via tab again, it does not work.
Looks like I need to live with that (or find a workaround in my app).
Can I ask another question - do you know by heart if that can be enabled easily for spinners too?
Okay, got it working for a JSpinner by subclassing this and setting the JTextField.selectAllOnFocusPolicy to always only for tabbing in, but I did not find a way to set selectAllOnMouseClick on component level (only globally). Did I miss something?
According to JTextField selects all text the first time it is set visible. and https://www.formdev.com/flatlaf/client-properties/#JTextField the default behaviour of focusing a textfield would be to select all text (like most UI frameworks do).
I could not make that working in my app - but this is not even working in your demo. I suspect it isn't working at all?
The text was updated successfully, but these errors were encountered: