diff options
Diffstat (limited to 'javax/swing/ProgressMonitor.java')
-rw-r--r-- | javax/swing/ProgressMonitor.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/javax/swing/ProgressMonitor.java b/javax/swing/ProgressMonitor.java index dc0c6434c..73e36b9ca 100644 --- a/javax/swing/ProgressMonitor.java +++ b/javax/swing/ProgressMonitor.java @@ -398,7 +398,11 @@ public class ProgressMonitor if (( now - timestamp ) > millisToDecideToPopup ) { first = false; - long expected = ( now - timestamp ) * ( max - min ) / ( progress - min ); + + + long expected = ( progress - min == 0 ) ? + ( now - timestamp ) * ( max - min ) : + ( now - timestamp ) * ( max - min ) / ( progress - min ); if ( expected > millisToPopup ) { |