JDK-4910864 : JProgressBar (indeterm.) renders wrong on WindowsLookAndFeel, Windows2000 + XP
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.2,6
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2003-08-21
  • Updated: 2017-05-16
  • Resolved: 2006-04-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.
JDK 6
6 b82Fixed
Related Reports
Duplicate :  
Relates :  
Description
Name: rmT116609			Date: 08/21/2003


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

FULL OS VERSION :
Microsoft Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
JProgressBar, when set to indeterminate mode, renders as a bar moving left-right-left, on Windows 2000 and XP, with WindowsLookAndFeel.

Actually WindowsXP's native components render indeterminate mode progress bars as a couple of dots, moving left-right, then starting again left-right.

You can see the actual behaviour when using the "search for files" facility on WindowsXP.

AFAIK this is called "marquee" style and was introduced with WindowsXP.

It is a visual fault to not simulate that visual style.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create JProgressBar. Set Indeterminate to true. Look how it renders.
Then open file search facility on WindowsXP. Search for some file. Look how that renders.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Should render same as WindowsXP does.
ACTUAL -
Renders like Metal Look and Feel.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import javax.swing.*;

public class X {
  public static void main(String[] a) {
    JFrame f = new JFrame();
    JProgressBar p = new JProgressBar();
    p.setIndeterminate(true);
    f.getContentPane().add(p);
    f.pack();
    f.show();
  }
}
---------- END SOURCE ----------
(Incident Review ID: 199860) 
======================================================================

Comments
EVALUATION Will fix for mustang. ###@###.### 2004-11-09 16:42:53 GMT I have built a fix by modifying the rendering code for indeterminant mode in WindowsProgressBarUI to draw the moving chunk using the skin from XP. In order to support the proper animation I had to add a getFrameCount method to the parent class, BasicProgressBarUI.
25-09-2004