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

Swing BorderFactory.createBevelBorder() spec doesn't completely specify behavior

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.4.0
    • Fix Version/s: None
    • Component/s: docs
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description


      In Merlin, the spec for
      javax.swing.BorderFactory.createBevelBorder(int,Color,Color,Color,Color)
      says:
        Creates a beveled border of the specified type, using the specified colors
        for the inner and outer highlight and shadow areas.

      This method is under-specified.

      The spec should specify that the inner and outer shadow colors are
      switched, depending on whether the border is lowered or not.


      Example:
      Create a button with a beveled border that has the following
      characteristics:
        shadow outer: red
        shadow inner: blue
      ie:
        jl = new JLabel("BorderTester");
        jl.setBorder(BorderFactory.createBevelBorder(raisedInt, Color.WHITE, Color.BLACK, Color.red, Color.blue));

      The following behavior is observed in this situation:
      When the border is raised:
        shadowInner=blue
        shadowOuter=red

      When the border is lowered:
        shadowInner=red
        shadowOuter=blue


      The following JCK 1.4 test fails due to this bug:
      api/javax_swing/interactive/BorderFactoryTests.html#BorderFactory[BorderFactoryTest0003]

      To run this test, run the attached script (jdkjck) as follows:
      jdkjck -jdk:/java/re/jdk/1.4/archive/fcs/binaries/solsparc -jck:/java/re/jck/1.4/archive/fcs/binaries/JCK-runtime-14 -runtime api/javax_swing/interactive/BorderFactoryTests.html

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sharonz Sharon Zakhour (Inactive)
              Reporter:
              gaurisha Gauri Sharma (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: