JDK-4760089 : 1.4 REGRESSION: Compound TitledBorder not opaque
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.0
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_7
  • CPU: sparc
  • Submitted: 2002-10-08
  • Updated: 2010-07-01
  • Resolved: 2010-07-01
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7Resolved
Related Reports
Duplicate :  
Description

Name: sv35042			Date: 10/08/2002


FULL PRODUCT VERSION :
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)


FULL OPERATING SYSTEM VERSION :
SunOS ganymed 5.7 Generic_106541-17 sun4u sparc
SUNW,Ultra-5_10


ADDITIONAL OPERATING SYSTEMS : linux



A DESCRIPTION OF THE PROBLEM :
Creating a compound TitledBorder containing another
right-aligned TitledBorder over an EtchedBorder paints the
topmost title over the etched border without erasing the
background.

In 1.3 and before the left-aligned border was opaque.


REGRESSION.  Last worked in version 1.3.1

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Run the simple example demonstrating how the border has
been assembled.


EXPECTED VERSUS ACTUAL BEHAVIOR :
Expected: An etched border with two title texts each with
opaque background.

Actual: The left title is transparent, overlapping the
etched border.

This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JLabel;
import javax.swing.border.TitledBorder;
import javax.swing.border.EtchedBorder;

public class BorderTest
{
  public static void main(String[] args)
  {
    // create an etched border with left and right texts
    EtchedBorder etched = new EtchedBorder();
    TitledBorder count  = new TitledBorder( etched, " 123 ",
      TitledBorder.RIGHT, TitledBorder.TOP );
    TitledBorder border = new TitledBorder( count, " Title " );
    // add the border to a panel
    JPanel panel = new JPanel();
    panel.add( new JLabel("Hello World!") );
    panel.setBorder( border );
    // create a window for it
    JFrame frame = new JFrame();
    frame.addWindowListener( new WindowAdapter()
    {
      public void windowClosing(WindowEvent e) { System.exit(0); }
    } );
    frame.getContentPane().add( panel );
    frame.pack();
    frame.setVisible(true);
  }
}

---------- END SOURCE ----------

Release Regression From : 1.4
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.

(Review ID: 143739) 
======================================================================

Comments
EVALUATION Try to fix in an upcoming release ###@###.### 2002-10-18
18-10-2002