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)
======================================================================