-
Bug
-
Resolution: Unresolved
-
P4
-
8, 11, 14.0.2
-
x86_64
-
windows_10
A DESCRIPTION OF THE PROBLEM :
JTextField no longer paints a blue focus border under the native Windows look and feel or any of the other look and feels. JTextArea, JComboBox, and other multiline text components have also stopped painting the focus border.
https://docs.microsoft.com/en-us/windows/win32/uxguide/ctrl-text-boxes
Note the blue focus border of textbox in image 34 vs image 14:
https://docs.microsoft.com/en-us/windows/win32/uxguide/images/ctrl-text-boxes-image14.png
https://docs.microsoft.com/en-us/windows/win32/uxguide/images/ctrl-text-boxes-image34.png
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create and focus a JTextField field.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The JTextField would be painted with a focus border indicating that it has the keyboard focus.
ACTUAL -
The JTextField is painted as if it does not have any focus.
---------- BEGIN SOURCE ----------
https://docs.oracle.com/javase/tutorial/uiswing/components/textfield.html
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Add focus change listener and set a border manually when the text field gains focus.
FREQUENCY : always
JTextField no longer paints a blue focus border under the native Windows look and feel or any of the other look and feels. JTextArea, JComboBox, and other multiline text components have also stopped painting the focus border.
https://docs.microsoft.com/en-us/windows/win32/uxguide/ctrl-text-boxes
Note the blue focus border of textbox in image 34 vs image 14:
https://docs.microsoft.com/en-us/windows/win32/uxguide/images/ctrl-text-boxes-image14.png
https://docs.microsoft.com/en-us/windows/win32/uxguide/images/ctrl-text-boxes-image34.png
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create and focus a JTextField field.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The JTextField would be painted with a focus border indicating that it has the keyboard focus.
ACTUAL -
The JTextField is painted as if it does not have any focus.
---------- BEGIN SOURCE ----------
https://docs.oracle.com/javase/tutorial/uiswing/components/textfield.html
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Add focus change listener and set a border manually when the text field gains focus.
FREQUENCY : always