JDK-4735514 : Non-rollover JToggleButton in JToolBar have incorrect border
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.2
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_nt
  • CPU: x86
  • Submitted: 2002-08-22
  • Updated: 2002-11-02
  • Resolved: 2002-11-02
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.
Other
1.4.2 mantisFixed
Related Reports
Relates :  
Relates :  
Description
Non-rollover JToggleButtons placed in a JToolBar have the wrong border. This is a problem with the 1.4.2-b02 build using the Metal LAF. You can observe this problem on SwingSet2 and was introduced as a side effect from the fix to 4523149.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis FIXED IN: mantis INTEGRATED IN: mantis mantis-b06
14-06-2004

SUGGESTED FIX There are a few fixes that can be pursued: 1. All internal Borders should extend UIResouce. 2. Make BasicToolBarUI.createNonRolloverToggleBorder() protected so that the correct border for metal toggle buttons can be installed. To complicate things even more, JCheckBox shouldn't have a non rollover border under Metal (see 4465528).
11-06-2004

EVALUATION The problem is in MetalToolBarUI.setBorderToNonRollover() calls the super class method which sets the non rollover toggle button border to an internal border. This border is not a UIResource (although it should be) so the test fails and it doens't install the correct non-rollover border on the Metal JToggleButton. This is all a big hack since the real solution is to make BasicToolBarUI.createNonRolloverToggleBorder() protected so that the correct border for metal toggle buttons can be installed. To complicate things even more, JCheckBox shouldn't have a non rollover border. Fixing this bug should ensure that 4465528 does not regress. This should be refactored for Tiger when API changes can be made. ###@###.### 2002-08-22 The compound borders which have been created internally in MetalToolBarUI and BasicToolBarUI should be makde from CompoundBorderUIResouce instead of CompoundBorder. This will ensure that the test for UIResource in the setBorder...() methods will succeed. ###@###.### 2002-10-23
23-10-2002