JDK-6939209 : Nimbus: JSlider setPaintTrack(boolean) method doesn't work as expected
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u10
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2010-03-30
  • Updated: 2012-03-22
  • Resolved: 2010-04-20
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 6
6u21Resolved
Related Reports
Duplicate :  
Description
Manual JCK test api/javax_swing/interactive/JSliderTests.html#JSlider[JSliderTest0010] fail with Nimbus LaF. 
Tests check  setPaintTrack(boolean) method of the class JSlider. 
Test needs to do the track of the slider to become visible/invisible. It works without Nimbus LaF and has no effect with Nimbus.

source of the test:
http://stt-13.russia/set/stt/jck_promotions/6b/b24/binaries/JCK-runtime-6b/tests/api/javax_swing/interactive/JSliderTests.html

Comments
EVALUATION This CR is found to be a duplicate of the exiting CR #6923305, the subCR for JDK 6 will be filed
20-04-2010

EVALUATION This is a real bug, JSlider shouldn't paint the track with setPaintTrack property set to false Here is the minimal test case: import com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel; import javax.swing.*; import java.awt.*; public class SliderTest extends JFrame { public SliderTest() { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setLayout(new FlowLayout()); JSlider slider = new JSlider(0, 100); slider.setPaintTrack(false); add(slider); pack(); } public static void main(String... args) throws Exception { UIManager.setLookAndFeel(new NimbusLookAndFeel()); SwingUtilities.invokeLater(new Runnable() { public void run() { new SliderTest().setVisible(true); } }); } }
07-04-2010