JDK-4820080 : RFE: Cannot Change the JSplitPane Divider Color while dragging
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.1
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_nt
  • CPU: x86
  • Submitted: 2003-02-18
  • Updated: 2022-03-10
  • Resolved: 2003-07-26
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
5.0 tigerFixed
Related Reports
Relates :  
Relates :  
Description
Name: jk109818			Date: 02/18/2003


FULL PRODUCT VERSION :
j2sdk1.4.1_01

FULL OPERATING SYSTEM VERSION :Win NT 4.0


A DESCRIPTION OF THE PROBLEM :
I want to change the color of the JSplitPane divider. I
opened the code and found that, the color is hard coded to
darkGray while one is dragging the splitDivider. I have an
application where the components on SplitPane have black
background, So when i drag I can not see the split getting
dragged. Can some one fix this, by externelising the
SplitDivider color so that it can be changed at run time.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
****** The code snippet of BasicSpiltPaneUI *******

    /**
     * Returns the default non continuous layout divider, which is an
     * instanceof Canvas that fills the background in dark gray.
     */
    protected Component createDefaultNonContinuousLayoutDivider() {
        return new Canvas() {
            public void paint(Graphics g) {
                if(!isContinuousLayout() && getLastDragLocation() != -1) {
                    Dimension      size = splitPane.getSize();

                    g.setColor(Color.darkGray);
                    if(orientation == JSplitPane.HORIZONTAL_SPLIT) {
                        g.fillRect(0, 0, dividerSize - 1, size.height - 1);
                    } else {
                        g.fillRect(0, 0, size.width - 1, dividerSize - 1);
                    }
                }
            }
        };
    }
---------- END SOURCE ----------
(Review ID: 181300) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger FIXED IN: tiger INTEGRATED IN: tiger tiger-b13
24-08-2004

EVALUATION Name: apR10133 Date: 06/27/2003 We could set the color of dragged divider in LAF defaults. ###@###.### ======================================================================
24-08-2004