How to stop/start an animation with setImageObserver()

Hi,
I have an animated gif that I want to use for when I'm waiting on a long operation (like the upper right icon on Netscape). The gif starts its animation without me telling it. I was doing some code like this:
ImageIcon icon = ...
JLabel label = new JLabel( icon );
icon.setImageObserver( label );
I assumed if I removed the setImageObserver() call then it wouldn't stop it. But, it didn't so I tried:
icon.setImageObserver( null );
But, that didn't have any effect. I want to start and stop this animation as I begin and end long operations how do I do this without using a Timer() and painting it myself.
charlie

Hi Charlie, did you ever find the answer to your question? I'm in an identical situation..

Similar Messages

  • How do you start a loop with an event and end the loop when u release ....

    How do you start a loop with lets say an event of some sort, whether it be holding down a key or pressing the mouse click and then stopping the loop when you release that key or mouse button.?
    double c = 1.8, i = 1, max = 90, exp = 0;
    final double inc = 0.002; //speed at while it increases
    boolean f = false, g = false;
    while (true)
        while (f == false && stopMeter == false) //increasing speed going up to 90
            exp = Math.pow (c, i);
            i += inc;
            pAngle.setText (Math.round (exp) + "");
            if (exp > max)
                f = true;
                g = false;
            } //end if
        } //end while
        while (g == false && stopMeter == false)  //decreasing speed going down from 90
            exp = Math.pow (c, i);
            i -= inc;
            pAngle.setText (Math.round (exp) + "");
            if (exp < 1)
                g = true;
                f = false;
            } //end if
        } //end while
    } //end whilethis is a snippet of my increasing increments. Its for an angle meter. I can't get it to stop, when the user clicks or does something... the program just gets stuck in an infinite loop. I am still new to java and i do not know how to fix this.

    You are in the wrong forum. Try this one instead: http://forum.java.sun.com/forum.jspa?forumID=31
    /M

  • My hard drive died.  How can I start my computer with my Time Machine external drive?

    My hard drive died.  How can I start my computer with my Time Machine external drive?

    Pondini wrote:
    If you're on 10.7.2, yes, you can boot from the TM drive.
    Beep, beep, beep....
    Hold ON! Getting a call on the red phone.
    "Yes...yes.... ok!"
    It's confirmed, H.e.l.l. has finally frozen over!  TM drives are now bootable!
    Still it's not a real bootable clone, can't run the computer off the external drive for long in only Recovery mode, still requires the boot drive to be replaced if it not functional, and with TM backing up every hour, isn't going to offer much software protection as the TM drive is just as likely to be as messed up as the internal boot drive.
    For a iMac it still requires the computer to be taken in to Apple for a drive replacement, as ONLY Apple can do it due to proprietary connections and firmware on the iMac hard drives.
    But it is bootable!
    The backup time factor can be controlled using TimeMachine Editor, from every hour to just when the user thinks it's necessary.
    Apple lurches slightly forward!  Hurray!
    Question is, can one restore from earlier stable TM's or just the last one? In this bootable fashion?

  • How to stop specific query attached with other query in same process using With method

    Would it be possible to stop one query out of two queries attached to single process...because i see it is returning one IDisposable inteface...if i call dispose() method...two queries are stopped/killed...
    So how to stop specific query which is combined with other queries in a  same process at runtime i.e., attach or detach kind of thing?
    Thanks in advance
    Satish

    Yes, the overloading of the term "Process" can be confusing. In SI, depending on your edition of StreamInsight, a process can run on one or more threads from a pool of threads and are scheduled together. Don't think of a process necessarily as a single
    thread or multiple processes as a method of multi-threading.
    As for a limit on the number of queries, there isn't a hard limit that I'm aware of. However, there will be a practical limit that will vary based on the complexity of the query, the event rate and your hardware (# of cores). If you are using Standard Edition,
    this limit is much smaller as you only have a single scheduler thread. With Premium Edition, you have a scheduler thread for each core on the machine so you can get higher throughput and lower latency. But if you have, say, 4 cores on the machine (don't count
    hyperthreaded cores, just real cores), 100 queries and a target throughput of 100K events/second, you'll likely have some problems. At 1K events/sec, you'd likely be fine though. With 32 cores and Premium Edition, you'd probably be OK with 100K events/sec.
    So ... like I said, it depends.
    DevBiker (aka J Sawyer)
    Microsoft MVP - Sql Server (StreamInsight)
    If I answered your question, please mark as answer.
    If my post was helpful, please mark as helpful.

  • How to stop start SAP system from SAP transactions?

    Hi Experts,
    How can i stop start the SAP system from SAP screens? Are there any transaction for this  need?
    thanks,
    philaphi

    Hi,
    Use Tcode RZ03 -->  Control --> Stop SAP Instance.
    Best Regards,
    Sachin.

  • How do i create an animation with one frame for each layer?

    I have 76 sequential images that i've loaded as layers using bridge, then aligned using photoshop.
    I would now like to create a 76 frame animation with one animation frame for each layer
    (the layers are in sequential order).
    is there an easy way to do this
    or do i have to create 76 frames (can duplicate multiple to speed it up)
    then set layer visibility for each frame?
    thanks
    bill w
    astro.whwiii.net

    thanks for all the replies
    got it
    here's a rough draft of 2 hours of sunshine
    http://whwastro.homestead.com/files/big/31-05-2014-prom-animation.gif
    -bill w
    astro.whwiii.net

  • How to avoid starting a page with line breaks?

    Hello. I've just started to refine my Master's thesis and some of the topics moved up and down as I edited their contents. The problem is that in some cases the topic breaks right after the title, and the rest of the contents just move away to another page. Is there any way to avoid starting a page with line breaks or broken topics?

    At the end of your title, you didn't inserted a line break but a paragraph break (carriage return).
    Acivate the mode "Show hidden characters"
    Select the carriage return (paragraph break)
    Delete it
    Press Shift + return to insert a true line break.
    It may be useful to apply that several times if you inserted several carriage returns between the title and the first filled line.
    Yvan KOENIG (VALLAURIS, France) 15 mai 2011 19:40:14

  • How do i start a chat with someone?

    when i set it up -- i used my aol im account.
    but i already have aim on this computer -- so i guess that was a mistake.
    i thought i switched over to my .mac account -- but it's acting weird.
    i have a friend online right now that i want to contact -- and start a chat with -- but when i try and add participants... i click "Other..." put his name in as "person i want to start the chat with" but there are no services in the drop down menu to choose from.
    any help would be much appreciated!
    thanks in advance

    Hi,
    So you have iChat with an @Mac name as your Screen name.
    Do you have anyone in you Buddy List ?
    However you do know a Buddy's Name and you are staring a New Chat with him.
    I am not sure where you are reading "Other"
    A New Chat from the File Menu will start a group chat and people in your Buddy List can be dragged there and Invited
    A New Chat with Person will ask you to select an account Type/Service and the Buddy's name.
    Right Clicking a Buddy in the Buddy list will produce a Pop Up menu to chose a chat type if that is what you meant as will highlighting the Buddy and using the Buddies menu.
    If you started a single chat with someone then you have to start a Group chat before you can invite an extra Buddy.
    11:12 PM Saturday; November 3, 2007

  • How do I start on boot with linux?

    Hi,
    I'm running on Red Hat Enterprise Linux Server release 5.4 (Tikanga). How do I start the weblogic server on boot? Can I just put in the startWebLogic.sh from the /opt/Oracle/Middleware/user_projects/domains/adf2_domain/bin directory into init.d? Is there another script somewhere that I can use for this? I've searched and searched for this to no avail.
    Thanks,
    janel10

    You may also need to auto-start your nodemanage process(es). So that if your machine restarts, nodemanager will start and then ( if you have CrashRecoverEnabled=true in your nodemanager.properties file ), nodemanager will start your managed servers for you.

  • How to use "start" and "duration" with HLS stream

    Hi all,
    is it possible to use "start" and "stop" with HLS stream like rtmp stream?
    If yes, how?
    thanks in advance.

    Hi,
    This is completely player side fucntionality you are asking for. However, I guess default player that comes on safari (iPad), quicktime has the player timeline with stop and start option. But if not, you can create your custom player using exposed api of AVPlayer. Check-out AVPlayer api's.
    FMS, by nature of protocol will respect the request to get the data(in case of client-play-start)  and will not automatically push the data to the client if not asked for by the client (as in case of client-play-stop).
    Thanks

  • How to stop syncing of iPhone with my account?

    Hi, I helped a friend to activate her iPhone using my computer and - silly me! my apple ID since she did not have one.
    But I entered her email account.. no her iphone aitomaticalles syncs my mac and her phone plus her email account.. how can i stop that???

    Go to settings, general, reset, erase all content and settings and set her phone up as new, with her own apple id. She doesnt have to connect to your computer.

  • (second time) Two questions - One is, Firefox will not sign me in completely and remember passweords., shown in details. Two- how to stop the loading animations

    Since no one is replying, i have to try again
    Deatails for number 1:
    Firefox will not sign me in and remember my passwords at all. It first started on this site, New Jersey Online (NJ.com). I created an account there and Firefox will not log me in. That happened, January 3rd, 2012.
    About NJ.com problem
    I created an account there. Then I signed into my new account. I did get correct username and password. But the browser does not log me into the acount. I looked all around NJ.com for answer and my problem was not in the forums/blogs.
    On Jan 4, 2012 - On the City Data forum I logged into my account there.
    About the city data forum problem
    I logged into my account there.
    Firefox asked me if I want to remember this passwod, i said Yes. The box in city data forum has a remember be box I checked it.
    The result means- I did not get signed in at all.
    I tried multiple times, none worked.
    I allowed firefox to do these things -
    1. Remember browsing history for at lease one day
    2. Remember download histroy.
    3. Accept cookies from sites, including third party cookies, until their expiration
    4. Clear the folowing when firefox closes: browsing history, download history, and form/search history.
    I feel afraid this problem is gonna hsppen forever (and maybe even on this site!), and it will not sign me in to any site on the internet.
    Number 2 Question
    Any way to disable the loading animation in Firefox 3.6.15? it makes me forget what I was going to do. it's also shown in the addon update information. PLease help me disable the loading animation Everywhere in the Firefox browser.
    For other sites with loading animations, I can use the Adblock plus element hiding helper . Just need to remove the animations by firefox
    Please help me ASAP (as soon as possible), thank you!

    See:
    *https://support.mozilla.org/kb/Cannot+log+in+to+websites
    Can't you sign in at all or aren't you signed in anymore if you revisit that website another time (next day)?
    See also:
    *http://kb.mozillazine.org/Websites_report_cookies_are_disabled
    *http://kb.mozillazine.org/Cookies
    What do you mean with the ''loading animation''?
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • How to stop a while loop with long delay

    Hi everyone,
    I am building a simple program for turning on and off a single Bit.  The task is to turn ON the Bit for a period length T1, and OFF the Bit for a period length T2. T1 is normally different from T2, and can be controlled  by users. 
    Since T1 and T2 can be variable, they sometimes can be very long.
    If I use a Wait function inside a While loop, it needs long delay to be able to Stop the Main program.
    The same situation happens when I use Timed loop.
    Can anyone suggest me how to do this task?
    Thanks a lot. 
    Message Edited by tatuan on 04-12-2010 12:56 AM

    Here's another possibility using OpenG Wait ms:
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • How to get started Organizing photos with tags and albums

    Apporximately 15,000
    Mostly family, vacations, travel, etc over 30 years
    What is the BEST way to get started?  Should I tag them first or put them in albums and sub-albums and then try to tag and further identify them?  I know nothing of how is best to proceed.
    I am oveerwhelmed with the process and cannot seem to find a starting point.  I have looked at many of the tutorials, but cannot find a "1-2-3 A-B-C" roadmap.
    Message title was edited by: Brett N

    I would recommend doing all (okay, almost all) of your organizing via tags. Don't bother using albums unless there are a subset of photos that you want to display somehow (like a slideshow, or photobook) in which case albums are the right tool. Also, make sure that when appropriate, you add the proper captions and notes.
    I would start by using pencil and paper (or word processor) to make a list of categories and tags, in the appropriate hierarchy, that you might want. For example, in the people category, there are tags Jones Family, Smith Family, etc. (and sub-tags with people's names) In the event category, there are tags Vacation, Beach, Christmas, Hanuka, etc. Other categories you might want: Location (example: New York, Boston, Illinois), Content (mountain, church, waterfall, gorilla, historical site). This part completely depends on you.
    Once you have this hiearachy of categories and tags to your liking, start creating/adding the tags (and captions and notes if needed) to your photos. You can work in small batches. Eventually you will have all your photos tagged (trust me, I know, I did this too).
    Do NOT: move photos or folders from here to there, or rename them ... this is unnecessary extra work, as you will be using your tags from this point forward to locate your photos (exception: if you want/need to move the photos to a different hard disk, then by all means do so).

  • How can I start any application with buttons

    Hello, I want to start any kind of applications with Buttons. I want to make me a GUI with buttons and with one button I want to start Outlook, but I dont know how this will work!
    THX for your help

    Runtime class exec methods
    If your Outlook executable is in different path ... import java.io.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Test2 extends JFrame implements ActionListener
       public Test2()
          super("Test");
          setDefaultCloseOperation(EXIT_ON_CLOSE);
          setSize(300, 200);
          JButton b = new JButton("Outlook Express");
          b.addActionListener(this);
          getContentPane().setLayout(new FlowLayout());
          getContentPane().add(b);
       public void actionPerformed(ActionEvent e)
          try{
             Runtime runTime = Runtime.getRuntime();
             Process proc = runTime.exec
                         ("C:\\Program Files\\Outlook Express\\msimn.exe");
             proc.waitFor();
          }catch(IOException ioe){System.out.println("Wham");}
          catch(InterruptedException ie){System.out.println("Bop");}
       public static void main(String[] args)
          new Test2().setVisible(true);
    }

Maybe you are looking for

  • When I sign out of my bank account, Firefox says its blocked and I have to close the browser, why?

    I clicked sign out from my bank account, and a message came up that my account has been blocked, and I am requested to close my browser. Once I received an error message. ID Code:c967ecee-285b-4a1c-85fe-3f5cfdaaafdd This has happened several time now

  • HTTP Receiver - Proxy

    Hi, I had to design a file----- XI - HTTP scenario. Say i am connect to a 3rd party with address 11.11.111.11 throgh the HTTP call. But now i am told that a firewall wil be in place between XI and HTTP. What does that mean ? do i still have to call t

  • Webdynpro ABAP Caching Problem in Portal

    Hi All, We have developed custom applications using Webdynpro - ABAP, using FPM and accessing those applications through SAP Netweaver Portal 7.0. I have deactivated all the caching techniquies in Portal @ iview level and Page level, Portal Runtime a

  • N96 Upper case problems

    I cannot get upper case letters, when i press the button it automatically high light without me being able to turn it off, am i missing something or is this a fault?

  • Mobile Account Sync Logging?

    Is there a log somewhere that I can check to see what files are synced during a Mobile Account sync session? Something like a sync log file? I looked though the WGM'er and didn't find anything. Thanks...