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

Why are there two values for LEFT, RIGHT and CENTER

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 1.3.0
    • 1.0.1
    • client-libs
    • None
    • beta
    • x86
    • generic
    • Not verified

      The two classes

      com.sun.java.swing.border.TitledBorder
      com.sun.java.swing.SwingConstants

      Both define LEFT, RIGHT and CENTER. The first is used for text justification, and the second is for "alignments"

      In addition, the values of these two versions of LEFT, CENTER and RIGHT are different (1, 2, 3 in the former, 2, 0, 4 in the latter).

      Also, wouldn't it be more consistent if TitledBorders used "alignment" terminology just like the other swing components (AbstractButton, JTextfield...) rather than using "justification" ?

      I don't care which term you use as long as it's the same.

            svioletsunw Scott Violet (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: