Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4158610

Weak toString method in Swing components

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.2.0
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      1.2fcs
    • CPU:
      sparc
    • OS:
      solaris_2.6
    • Verification:
      Not verified

      Description

      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 <###@###.###>

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              malberssunw Michael Albers (Inactive)
              Reporter:
              malberssunw Michael Albers (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: