-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
1.2.0
-
generic
-
generic
Name: krT82822 Date: 12/22/98
A dialog will typically have a single designated default button. Since Swing changes the default button each time you change focus to a button
that is "default capable," this requires developers to alter the state of all but one button... which is laborious and error prone in a large application
with many dialogs.
This feature may have been introduced to attempt to mirror the standard behavior of a Windows application in which the currently focused button
is painted with the bold border normally used to indicate the default button. Unlike Swing's implementation, this is not a permanent change but is
done temporarily to avoid confusing the user about which button will be activated when enter is pressed. When focus is restored to a non-button
control the dialog's original default button is once again painted with a bold border.
The "default capable" flag should be ignored by the Windows look and feel. Any button that can have focus should be painted with the style of the
default button only so long as it retains focus, and the actual default button should be painted as such when focus is in any other type of component.
(Review ID: 48576)
======================================================================
- duplicates
-
JDK-4146858 Wrong DefaultButton behavior in Windows & Motif L&Fs
-
- Resolved
-