EVALUATION
this regression was introduced by the fix for 6349010 [REGRESSION: XP L&F: on jdk 1.6, preferred size of JToggleButton in JToolbar on winxp is wrong.]
--
Insets XPEmptyBorder.getBorderInsets(Component c, Insets insets)
415 insets.top -= 2;
416 insets.left -= 2;
417 insets.bottom -= 2;
418 insets.right -= 2;
--
The resulting insets have nothing to do with the border. Moreover in case the same insets instance is used over and over again the values got smaller and smaller.
We need to initialize insets first to the border values.
insets.top = top;
insets.left = left;
insets.bottom = bottom;
insets.right = right;
I think we want border for JCheckBox and JRadioButton to be the same as before the fix for 6349010. Thus I suggest to make it a special case.
There are two other problems related to this bug:
6497781 Should use Prop.CONTENTMARGINS instead of Prop.SIZINGMARGINS
6497784 thread unsafe use of static variables
|