Problem with "transparent" progress bar

i am trying to implement a progress bar that monitors a long task. I used the example codes given in the swing tutorial and modified a little to make the progress bar indeterminate.
However, when the progress bar pops up, it is transparent, except for its title! I have search the forum and tried all the solutions given for this similar problem. My codes are already threaded.
Here's the excerpt of my codes. I used the LongTask, SwingWorker from the Swing tutorial and adapted ProgressBarDemo to ProgressBarA (only difference is indeterminate).
uploadData();
public boolean uploadData() {
boolean uploadSuccess = false;
final SomeLongTask someLongTask = new SomeLongTask(dataLoader);
final Thread pBarThread = new Thread(new Runnable() {
public void run() {
JFrame pBar = new ProgressBarA(someLongTask);
pBarThread.setPriority(Thread.MAX_PRIORITY);
pBarThread.start();
// this loop hopes to serve as a blocking,
// which apparently did not help.
while (!someLongTask.done()) {
pBarThread.join();
System.out.println("main thread yields and sleeps ");
Thread.yield();
Thread.sleep(1000);
uploadSuccess = someLongTask.getSuccess();
// some more post processing here.
return uploadSuccess;
class SomeLongTask extends LongTask {
DataLoader loader;
boolean success;
boolean completed;
public SomeLongTask(DataLoader l) {
loader = l;
lengthOfTask = 1000;
indeterminate = true;
public Object actualTask() {
statMessage = "Loading...";
success = loader.upload();
stop();
// return value is not important here.
// Just return any dummy value.
return new String("ok");
public boolean getSuccess() {
return success;
I suspect that after the pBarThread started, the main thread proceeds so fast that the progressBar frame cannot show up properly. But i am not very sure on on to thread the post processing part that should wait for the someLongTask to finish. The blocking loop did not seem to help either. :(
Pls kindly advise.
Regards,
kaikit

have you tried resetting ipod, cause as far as i know, this is sometimes just a temporary glitch, mine does this.

Similar Messages

  • Problem with the progress bar

    I've have a problem with the progress bar of my ipod. I bought a 5th generation ipod about 8-9 months ago. Now its progress bar stuck so it only shows the 5 dots. It doesn't show both scrubber bar and song time bar. When I press the center button, the 5 dots dissappear from the screen and then reappear but it doesn't show the other bars. Do you know what is the problem and How can I fixed it?

    have you tried resetting ipod, cause as far as i know, this is sometimes just a temporary glitch, mine does this.

  • Problem with the progress bar in swings

    Hi all,
    I need to show a progress bar till another window opens up in swings.Below is the code i used to show the progress bar.My problem is i am able to get the dialog box where i have set the progress bar but i cldnt get the progress bar.But after the specified delay,another window gets loaded.
    Plz tell me how to show a progress bar till another window loads.Any help is greatly appreciated :-)
                    //Show the progress bar till the AJScreens loads.
                    // Create a dialog that will display the progress.
                    final JDialog dlg = new JDialog(this, "Progress Dialog", true);
                    JProgressBar dpb = new JProgressBar();
                    dpb.setVisible(true);
                    dpb.setStringPainted(true);
                    dpb.setBounds(70,60,150,10);
                    dlg.getContentPane().setLayout(new BorderLayout());
                    dlg.getContentPane().add(BorderLayout.CENTER, dpb);
                    dlg.getContentPane().add(BorderLayout.NORTH, new JLabel("Progress..."));
                    dlg.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
                    dlg.setSize(300, 75);
                    dlg.setLocationRelativeTo(this);
                    // Create a new thread and call show within the thread.
                    Thread t = new Thread(new Runnable(){
                        public void run() {
    System.out.println("atleast comes here --->");
                            dlg.show();
                    // Start the thread so that the dialog will show.
    System.out.println("Gonna start the thread --> ");
                    t.start();
    System.out.println("Thread started --> ");
                    // Perform computation. Since the modal dialogs show() was called in
                    // a thread, the main thread is not blocked. We can continue with computation
                    // in the main thread.
                    for(int i =0; i<=100; i++) {
                        // Set the value that the dialog will display on the progressbar.
    System.out.println("i ----------> "+i);
                        dpb.setVisible(true);
                        dpb.setValue(i);
                        try {
                            Thread.sleep(25);
                        } catch (InterruptedException e) {
                            e.printStackTrace();
                    // Finished computation. Now hide the dialog. This will also stop the
                    // thread since the "run" method will return.
                    dlg.hide();regards,
    kani.

    Yeah i have tried that also.But no hope.
    My problem is am able to get the dialog box but not the progressbar,after the specified delay the dialog box goess off and the new window loads up.
    the progress bar is not getting displayed..that is my problem..
    can u plz help me out.

  • Problem with a progress bar for downloading attachment

    I display the progress bar for downloading attachments and it works fine … but when I am downloading some attachments I get the exception message:
    Exception in thread "main" com.sun.mail.util.DecodingException: BASE64Decoder: Error in encoded stream: needed 4 valid base64 characters but only got 1 before EOF, the 10 most recent characters were: "Q3w5ilxj2P"
    I found the explanation:
    Certain IMAP servers do not implement the IMAP Partial FETCH
    functionality properly. This problem typically manifests as corrupt
    email attachments when downloading large messages from the IMAP
    server. To workaround this server bug, set the
         "mail.imap.partialfetch"
    property to false. You'll have to set this property in the Properties
    object that you provide to your Session.
    http://java.sun.com/products/javamail/NOTES113.txt
    So I turned off partial fetch:
    Properties props = System.getProperties();
    props.setProperty("mail.store.protocol", "imaps");
    props.setProperty("mail.imaps.partialfetch", "false");
    Session session = Session.getDefaultInstance(props, null);
    Store store = session.getStore("imaps");
    store.connect("imap.gmail.com", "<username>","<password>");this solved the problem ….however the method getInputStream() from the Part class blocks the thread until the attachment is completely downloaded and it is impossible to get the information about the number of bytes which have been already downloaded from mailbox.
    Without this information it is impossible to display the progress bar. So is there a way to obtain this information and display the progress bar?
    Edited by: 911161 on 2012-01-31 10:55

    Try the answer I provided to your post on stackoverflow.com:
    http://stackoverflow.com/questions/9086700/how-to-displaly-progress-bar-for-downloading-attachment

  • HT1212 My ipad mini has been crashing a lot recently so I started a system reset. However, it's now stuck with the progress bar less than a quarter gone: this has been the case for several days now. I have tried resetting from itunes but it needs the pass

    Now it's stuck with the progress bar less than a quarter full. I have also tried resetting through itunes which works right up to the point where itunes states that it needs the passcode to be inputted into the ipad to connect to it. At which point it then sticks at the same progress bar point. HELP!! please, this ipad is really important to my work.

    Well the term "hotlined" I have never heard before. In any case many states (like NY) just passed regulatory powers to the State Public Service Commission of which it may be called something different in your state. You could file a complaint with them. Or file a complaint with your state attorney generals office, they also take on wireless providers.
    The problem here is the staff you speak to are poorly trained, in days gone by it took one call to them and they pulled up your account and see the error and had the authority to remove any errors. They did not remove legitimate account actions, but used their heads instead of putting a customer off or worse lying to the customer.
    Its a shame you have to go through what you going through.
    Good Luck

  • HT201263 my iphone 3g Stops responding, showing the Apple logo with no progress bar or a stopped progress bar, for over ten minutes ..plz give me suggusition ?

    Stops responding, showing the Apple logo with no progress bar or a stopped progress bar, for over ten minutes

    First thing to try is to reset your device. Press and hold the Home and Sleep buttons simultaneously ignoring the red slider should one appear until the Apple logo appears. Let go of the buttons and let the device restart. See if that fixes your problem.

  • I am having a strange problem with the awesome bar

    The awesome bar/location bar is no longer as awesome as it used to be. When I start typing in an address it seems like it no longer checks through my history and gives a list of possible matches but just gives the stem of an address. For example, if I type in 'goo' it will complete this to 'google.com' if I then append this with an '/a' it will complete this to 'google.com/analytics' but that's as good as it gets, as I say, no list from the history or bookmarks.
    I've checked the options and also about:config and all the settings are as they should be, as far as I can tell (and I certainly hadn't changed any of them when it started misbehaving). I've also disabled all extensions and plug-ins.
    It's driving my slightly bonkers because I quite often use sites with long addresses and can't remember each of the components of each address. I'd switch to using Chrome but I also use Firebug a fair bit so don't really want to do this.

    Hi cowtan, <br/>Sorry you are having problems with the awesome bar.
    I imagine the new behaviour may be reversed by changing some pref but I have not looked that up.
    Regardless of the new behaviour you seem to have some fault as my awesomebar still gives bookmarked items.
    As a troubleshooting step try adding an asterisk in the awesomebar (as first character or anywhere) that should then filter the results in the dropdown list to bookmarked only items, does that work ?
    * see [[Search your bookmarks, history and tabs with the Awesome Bar#w_changing-results-on-the-fly]]_changing-results-on-the-fly
    You possibly have some extension interfering with the awesome bar, try Firefox in safe mode (but do NOT* at this stage try the Reset Firefox option)
    <nowiki>*</nowiki>'''edit''' - personal opinion, if a user; such as you; is knowledgeable enough to use ''about.config'' the easy solution of ''FirefoxReset ''is probably not the best route, as it can have unwanted side effects that are avoidable.
    * [[Troubleshoot Firefox issues using Safe Mode]]
    Do your bookmarked items appear in safe mode ?
    <u>Try a new Profile.</u><br/>The best method for troubleshooting this will be to set up a new Firefox profile, you can then: experiment, troubleshoot, alter settings or extensions installed in that profile without changing and potentially damaging your current profile.
    * http://kb.mozillazine.org/Profile_Manager#Creating_a_new_profile
    I suggest to prevent unexpected problems you
    * use a sensible name such as test 2012 for the profile name
    * ensure an empty folder is used & do not then rename or delete the new profile (instead add or delete shortcuts to it)
    * also see http://kb.mozillazine.org/Using_multiple_profiles_-_Firefox

  • ITS 6.20 SP18 Problem with the top bar menus

    Hello Henning,
    we're using ITS 6.20 SP18 and experience a problem with the top bar menus in the SAPGUI for HTML (Enjoy Design) in both MSIE 6 and Moz Firefox 1.0.4.
    When clicking the dropdown menus in the top bar the menu simply won't open. This only occurs in all of our homegrown (Z*) services when dropping into SAPGUI for HTML (ITS is in mixed mode). However - When running service WEBGUI seperately (via ...scripts/wgate/WEBGUI/! ) the menus work funnily enough.
    This worked fine prior to the upgrade. Is there a new service parameter that I need to set? Have you got any more documentation? I checked out any related SAPNet notes on the SP18 documentation sheet, but couldn't find anything related.
    Kind regards,
    Michael

    > There is no known problem regarding ITS 6.20 PL 18
    > and the menu at this time. Please provide an example
    > for a service file (.srvc) of one of your Z
    > services and also the global.srvc.
    >
    <u>These are the <b>global.srvc</b> settings</u>
    ~appserver 
    ~client  010
    ~clientcert  1
    ~cookies  1
    ~exiturl 
    ~hostsecure  xxxxxxxxx
    ~hostunsecure  xxxxxxxxx
    ~language 
    ~login 
    ~logingroup  ZZZZZZZZ
    ~menu2002  0
    ~messageserver  xxxxxxxx.xx.xx.xx
    ~multiinstanceservices  1
    ~password 
    ~portsecure  443
    ~portunsecure  80
    ~routestring 
    ~runtimemode  pm
    ~systemname  XXX
    ~systemnumber  00
    ~theme  99
    ~timeout  120
    ~urlarchive  /scripts/sapawl.dll
    ~urlimage  /sap/its/graphics
    ~urlmime  /sap/its/mimes
    ~usertimeout  1
    ~webgui_theme  99
    ~xgateway  sapdiag
    ~xgateways  sapxgadm,sapdiag,sapxgwfc,sapxginet,sapxgbc,sapextauth
    ~rfctimeout     10
    ~noheaderokcode  1
    ~http_use_compression  1
    ~http_compress_level  7
    ~mysapcomnosso1cookie  1
    <u>These are the service settings for one of our <b>Z* services</b>:</u>
    ~AUTOSCROLL     0
    ~COOKIES     1
    ~GENERATEDYNPRO     1
    ~HTTP_COMPRESS_LEVEL     9
    ~HTTP_USE_COMPRESSION     1
    ~LISTSCROLLING     0
    ~LOGIN
    ~PASSWORD
    ~POPUPS     1
    ~STYLE     DHTML
    ~TRANSACTION     Zxxxxx
    ~WEBGUI
    ~WEBGUI_POPUPS     1
    ~WEBGUI_THEME     99
    Kind regards,
    Michael

  • HT1451 I am trying to restore my iphone but its stuck at the apple logo with the progress bar. What should I do?

    I am trying to restore my iphone but it has been stuck at the apple logo with the progress bar and it shows no signs of loading at all. What should I do?

    Hello kuukua.b,
    Thanks for using Apple Support Communities.
    Please try to restart and reset your iPhone by following the steps below, and then resume your restore process.
    Turn your iOS device off and on (restart) and reset
    http://support.apple.com/kb/ht1430
    Take care,
    Alex H.

  • When my Mac battery dies and I turn it back on, it always crashes on the grey screen with the progress bar, then it restarts (taking forever) and does not remember any of the programs I was running. MacBook Pro 13 inch running Mavericks

    When my Mac battery dies and I turn it back on, it always crashes on the grey screen with the progress bar, then it restarts (taking forever) and does not remember any of the programs I was running. MacBook Pro 13 inch running Mavericks

    http://osxdaily.com/2014/10/17/os-x-yosemite-installation-stuck/
    also use the Command-L to view logs during installation

  • Splash Screen with a progress bar at the bottom

    Hi,
    I want to display a splash screen with the progress bar at the bottom just like eclipse , limewire etc
    Take a look at the image below.
    [http://imageupload.com/out.php/i138889_splashScreen.png]
    Can anybody tell me how to achieve this type of splash screen?
    Thnx in advance.

    Search Google.
    This is one of the results: [Splash screen avec progress Bar|http://www.labo-sun.com/resource-fr-codesamples-1126-0-java-gui-splash-screen-avec-progress-bar.htm]

  • HT4623 My iphone had an error while updating and is now locked up on the apple screen with the progress bar

    Itunes was updating my phone from 6.01 to 6.1 and it came up with an error. I closed the error not thinking about it and now my phone is locked up on the apple screen with the progress bar on it.

    hi i tried to update my iphone 3gs from ios 4.1 to 6.1.2, while doing the same i got an error message (-5000) which i ignored an continued. it was almost about to complete while my itunes is not able to detect the iphone kindly help.

  • Place video with no progress bar?

    Hi
    I'd like to place a video seamlessly so it plays like an animation, with no progress bar or controls. It's easy to exclude the controls but there is still a progress bar. how to remove ?
    learning a lot here!
    thanks for the help!
    S

    If you disable "tap to view controls“ the video should play seemlessly.
    The desktop viewer shows the progress bar even with that setting disabled.
    On your iPad it will be without.
    —Johannes
    (mobil gesendet)
    Am 08.12.2011 19:32 schrieb "SteveLunny" <[email protected]>:
       place video with no progress bar?  created by SteveLunny<http://forums.adobe.com/people/SteveLunny>in
    Digital Publishing Suite - View the full discussion<http://forums.adobe.com/message/4071925#4071925>

  • TS3681 the device displays the Apple logo with no  progress bar for 8 hours until battery run flat.

    My Iphone4 displays the Apple logo with no progress bar for 8 hours until battery went flat this was after i try to make an up date know the  i tunes dosent reconise my phone.
    Can you please help me
    Thank you.

    http://support.apple.com/kb/ht1808

  • After a reset of settings on IPad2 it turns "on" but i only get to the logo screen with the progress bar under it. so it turns on to logo then to progress bar screen then off. and repeats over and over

    Well as I said in the "question", I did a reset of the settings on my IPad2. however when it powered back on from resetting. it lets the the logo screen with the progress bar under it. The progress bar gets about 1/4 of an inch from the left then stops. After a few mins Ipad shuts off then turns on to the logo screen, then goes to the logo/progress bar screen, does whats said above, then off. That cycle just repeats over and over. Any help with this would be appreciated.

    Recovery Mode Step by Step
    1. Hold Sleep/Wake button down and slide to turn off iPad
    2. Turn on computer and launch iTune (make sure you have the latest version of iTune)
    3. Plug USB cable into computer's USB port
    4. Hold Home button down and plug the other end of cable into docking port. Do not release button until you see picture of iTune and plug.
    5. Release Home button.
    On Computer
    6. iTune has detected iPad in recovery mode. You must restore this iPad before it can be used with iTune.
    7. iPad Recovery Mode on computer screen
    8. Select "Restore iPad"...
    9. Select "Restore and Update"
    10. Extracting Software.
    11. Preparing iPad for restore.
    12. Waiting for iPad.
    13. Verifying iPad restore...
    14.Restoring iPad software.
    15. Verifying iPad software.
    16. Verifying iPad Restore...
    17. Restoring iPad firmware...
    18. Your iPad is restored to factory settings; keep iPad connected to computer
    19. Activate iPad
    20. Enter Apple ID and Password
    21. Continue
    22. Welcome to Your New iPad
    (a) Set up as new iPad   (b) Restore from this backup (select from list of backups)
    23. Restore from this backup
    24. Continue
    25. Restoring iPad from backup
    26. The settings of your iPad have been restore; keep iPad connected to computer
    27. Syncing iPad (Step 1 to 5)
    28. Preparing apps to sync
    29. Copying 1 of 9
    30. Sync apps, movies and music to iPad
    31. Finishing syncing
    32. Eject iPad

Maybe you are looking for

  • No incoming video and audio for new Jabber video account

    We have registered a couple of jabber video account, but they all have the same issue, couldn't successfuly establish a call. However, it seems working fine for old jabber video account. Anyone can help?                  

  • JTextfield and JButton

    Hi all My problem is that i have a JTextfield that is connected to a Oracle database that allow the user to enter data in the database. I want to have a button that will allow the user to test to see whether the data entered in the textfield is valid

  • Nokia e7 faulty enter key since v0.22 software upd...

    hello. Ever since the update i have found out that my enter key does not work on certain forums. Its a bit frustrating as the site im an admin on is one of those with this issue and im required to type out big long posts but cant but them into clear

  • View image files in gallery on N95

    I can not view the pictures in the gallery that is saved to my 1gb memory card, any ideas...

  • Can't see n95 videos on c5-03

    Hello, I bought a nokia c5-03. Previously had a nokia n95 and now I can not properly view the n95 videos on my new nokia c5-03, image and sound are cut continuously. Someone could help me? Thank you!