Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4668513
Votes 0
Synopsis Swing BorderFactory.createBevelBorder() spec doesn't completely specify behavior
Category guides:none
Reported Against 1.4
Release Fixed
State 11-Closed, duplicate of 4664885, bug
Priority: 4-Low
Related Bugs 4664885
Submit Date 15-APR-2002
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
Work Around
N/A
Evaluation
Closing as a duplicate of 4664885.
  xxxxx@xxxxx   2003-01-27
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang