United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4910864 JProgressBar (indeterm.) renders wrong on WindowsLookAndFeel, Windows2000 + XP
JDK-4910864 : JProgressBar (indeterm.) renders wrong on WindowsLookAndFeel, Windows2000 + XP

Details
Type:
Bug
Submit Date:
2003-08-21
Status:
Resolved
Updated Date:
2006-04-26
Project Name:
JDK
Resolved Date:
2006-04-26
Component:
client-libs
OS:
windows_xp
Sub-Component:
javax.swing
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
1.4.2,6
Fixed Versions:

Related Reports
Duplicate:
Relates:

Sub Tasks

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.
                                     
2004-09-25



Hardware and Software, Engineered to Work Together