-
Enhancement
-
Resolution: Fixed
-
P4
-
1.2.0
-
1.2fcs
-
sparc
-
solaris_2.6
-
Not verified
It would be really nice if you'd implement a usable toString in
the Swing api. I wouldn't take much. The 1.1 awt 'Component'
implements toString and calls paramString. Simply override paramString in
each JComponent as in the following sample code for JLabel.
protected String paramString() {
return super.paramString() +
",mnemonic=" + mnemonic +
",text=" + text +
",defaultIcon=" + defaultIcon +
",disabledIcon=" + disabledIcon +
",verticalAlignment=" + verticalAlignment +
",horizontalAlignment=" + horizontalAlignment +
",verticalTextPosition=" + verticalTextPosition +
",horizontalTextPosition=" + horizontalTextPosition +
",iconTextGap=" + iconTextGap;
}
From Tom Crosman <###@###.###>
the Swing api. I wouldn't take much. The 1.1 awt 'Component'
implements toString and calls paramString. Simply override paramString in
each JComponent as in the following sample code for JLabel.
protected String paramString() {
return super.paramString() +
",mnemonic=" + mnemonic +
",text=" + text +
",defaultIcon=" + defaultIcon +
",disabledIcon=" + disabledIcon +
",verticalAlignment=" + verticalAlignment +
",horizontalAlignment=" + horizontalAlignment +
",verticalTextPosition=" + verticalTextPosition +
",horizontalTextPosition=" + horizontalTextPosition +
",iconTextGap=" + iconTextGap;
}
From Tom Crosman <###@###.###>
- relates to
-
JDK-4165048 inadequate toString() / paramString() methods within Swing components
- Closed