Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ProgressMonitor isn't much of a monitor



it seems to me that Sun's ProgressMonitor is a somewhat weak implementation of a decent idea. why is it so hard to get a PM to do -- well, to do almost anything at all?

i have a spot in my app where i want a PM to monitor a thread. the PM does in fact pop up, but not until AFTER the most time-consuming part of the algorithm. so the algorithm churns away, then right at the end before the thread exits, the PM pops up and stays open for a moment while the end of the algorithm runs.

what i want is a PM that will pop up right away and will stay open until the end. for some reason, these two calls do not work to that end:

                    pm.setMillisToDecideToPopup( 1 );
                    pm.setMillisToPopup( 2 );

furthermore, setting the progress a couple times before entering the initial, slow part of the routine doesn't work either:

                    pm.setProgress( 1 );
                    pm.setProgress( 10 );
                    pm.setNote( "Getting all items" );

i must be missing something obvious here, right? how do i get a PM to open immediately or almost immediately?

nicholas

ps all these problems are after i worked around the serious bug in Apple's ProgressBarUI implementation which results in a terrible memory leak, by telling swing not to use Apple's UI plaf class.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.