United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4995929 : Indeterminate JProgressBar prevents normal application exit

Details
Type:
Bug
Submit Date:
2004-02-17
Status:
Resolved
Updated Date:
2017-05-16
Project Name:
JDK
Resolved Date:
2004-03-27
Component:
client-libs
OS:
linux
Sub-Component:
javax.swing
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.2
Fixed Versions:
5.0 (b45)

Related Reports

Sub Tasks

Description

Name: gm110360			Date: 02/17/2004


FULL PRODUCT VERSION :
mooijs@tommy:~/projects/test$ java -version
java version "1.4.2_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06)
Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode)


ADDITIONAL OS VERSION INFORMATION :
Debian Linux

A DESCRIPTION OF THE PROBLEM :
See this example code:


import javax.swing.JProgressBar;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;

public class Test
{
	public static void main(String[] argument)
	{
		final JFrame jFrame = new JFrame();
		SwingUtilities.invokeLater(new Runnable()
				{
			public void run()
			{
				JProgressBar jProgressBar = new JProgressBar();
				jFrame.getContentPane().add(jProgressBar);
				jProgressBar.setIndeterminate(true);
				jFrame.pack();
				jFrame.show();
				jFrame.dispose();
				System.out.println("exit");
			}
		});
	}
}


After running this, the application should exit, because all non-deamonn threads are finished. However, the application does not exit.
If one does not make the JProgressBar indeterminate the same example does exit, so maybe a thread animating the indeterminate JProgressBar is left  running?

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the example in the description.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Application should terminate.
ACTUAL -
Application does not terminate.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
See description.
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
A workaround is to set call JProgressBar.setIndeterminate(false) before disposing the JFrame.
(Incident Review ID: 238781) 
======================================================================

                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
tiger-beta2

FIXED IN:
tiger-beta2

INTEGRATED IN:
tiger-b45
tiger-beta2


                                     
2004-06-14
EVALUATION

BasicProgressBarUI will be given a HierarchyListener that starts and stops the indeterminate animation based on the component's displayability (and changes to it).
###@###.### 2004-03-10
                                     
2004-03-10



Hardware and Software, Engineered to Work Together