Animated gif on JButton is not working

Hi all,
I have a JButton, which is used as a 'search button'. I want my search button to show an animated globe gif when search is going on. I have my code as below.
JButton searchButton = new JButton(MyUtilities.searchIcon());
ImageIcon animatedGlobe = MyUtilities.animatedGlobeGif();
searchButton.setPressedIcon(animatedGlobe );
At runtime the button is showing a static globe which is not animating.
Can any one please answer what could be the problem?
Thanks in advance,
amar

Thanx Demanic ,
I am doing swings for first time. Can you please tell me how to repaint the button using seperate thread?
Thanks,
amar

Similar Messages

  • I'm trying to apply an animation preset but it's not working.

    I'm trying to apply an animation preset but it's not working.  I've done every procedure to apply a preset to a layer.  But there seems to be nothing happening.  I can't for the life of me figure this one out.  Adobe help simply says drag and drop the preset onto the desired layer, did it and nothing happended.  What am I doing wrong?  Please advise.
    I'm using version 6.5 Professional on a Mac Pro computer.
    Thanks.
    - NV

    No problem.
    You will probably benefit from reading through the "Text" chapter of After Effects Help and the tutorials and such that it links to.
    If you need to start from the beginning and learn about the basics of After Effects, then I recommend working through the items under the "Getting started" heading on the After Effects Help and Support home page.
    Yes, these resources are largely about the new version of After Effects, but text animation hasn't changed a lot since version 6.5. (Some, but not fundamentally.)

  • Using animated GIF as JButton icon

    Hi,
    I am trying to use an animated gif as an icon in a JButton.
    Everything works as it should except the animation is static!!
    Screenshots and code are at:
    http://www.beammicrosystems.com/Java/JButton.html
    Anyone got any good ideas?
    Regards,
    Andrew

    well i think you can do this in a label you can watch for a animation like you want a gif so my idea is that you should just make the label as a button and them :
    JLabel label = new JLabel();
    label.setIcon = new ImageIcon("name.gif");
    and put it the setBounds
    label.setBounds(x,y,long,tall);
    and if you want that looks like a button just do this
    label.setBorder(BorderFactory.createRaisedBevelBorder());
    thats all.

  • Animated gif in mail are not visible after upgrade to mavericks

    Hi,
    I use a animated gif in my signature in mail. This gif was playing normally (like a animated gif) in mountain lion when I writes a new message. After upgrading to mavericks I can't see the animated gif playing. I just see the first frame. However when I send a mail to my iPad using iOS 7 the animated gif is playing normally.
    Thanx for every answer!

    I'm having this issue as well — I can no longer send animated gifs in Mail with Mavericks (10.9.0). The image retains its full image size and remains a gif format, but does not play, just sits static. This also affects forwarding animated gifs — which play fine in the mail window — they are static in the compose window and are sent static.

  • Animated Gif - Save for web not showing full frame range

    Hey,
    I'm trying to export an animated gif with 52 frames - I'm using the timeline in CS6, it's exported correctly in the past but when I try and save for web only a seemingly arbitrary number of rames appear in the animation. With no clear route to rectify this, I've tried to affect the outcome by simply moving things around on the timeline.
    I've had a variety of frame ranges (and frames) numbering between 2 and 6 frames, far off my 52 target. It's a simple image and equally simple transition to keep filesize down but I'm completely bamboozled by this. It looks like a bug but any advice I could get would be much appreciated.

    If it worked in the past with CS6 try resetting your CS6 Photoshop Preferences.  If you still have the problem after that.  Up load the PSD file to a server and post a link to it.

  • Animated Gifs in iWeb: Do they work?

    Do animated GIFs work in iWeb?
    If so, how do you get them in there without iWeb turning them to PNGs?

    Bonjour,
    Yes, they work.
    Drag and drop an animated gif to iWeb.
    publish
    In this [page|http://iweb.debutersurmac.com/siteiweb/Blog/Entrees/2009/3/4iWeb_09_et_lesimages.html] i have an gif (panda)
    Now you have a .mov file. But it isn't an movie : it isn't a file that quicktime can read...
    In source code, HTML tags are those used for an image.
    img src="../../../../Media/roulade-1.mov" alt="" style="height: 94px; position: relative; width: 99px; " class="inline-block"
    And if you drag and drop if from your browser to desktop, you'll have an .gif file (roulade-1.mov.gif).

  • Export for DVD with Animation codec without alphas channels not working?

    I'm using FCP 5 with DVDSP. My FCP projects consist of quicktime movies that are using the Animation compressor (for lossless quality), and the movies contain alpha channels (thus they were rendered at Millions + colors to preserve the alphas).
    This is my problem. I want to now export a quicktime movie to use in DVDSP with animation compression, so it is again lossless quality (obviously to presever the quality through these steps). But I do NOT want to preserve the alpha channels, because what I've learned is that when made into a DVD, the alphas are not preserved and the image looks wrong (as if without the alphas).
    So I basically want to "flatten" the video, if there was some way.
    I would assume the solution would be to, in FCP, export a quicktime at animation compression, but set to Millions for colors, and not Millions + (I was taught that the Millions + will preserve the alpha info).
    Well, what's happening is when I set it to that, it renders, but then I get info on the movie in Quicktime and it says it has Millions + still. And thus, it looks wrong in DVDSP.
    What is going on? Is this a bug in FCP?
    Does anyone have an idea as to how to get around this. The only thing that has worked for me is to export the Quicktime movie with "none" for compression, but that's making the movie SO large that I can't work with it and it doesn't play right when I make the DVD.
    I really appreciate anyones help on the matter. Thanks!
    Brian,.
    Quad-core 2.5 G5   Mac OS X (10.4.6)   30" Apple Cinema Display
    Quad-core 2.5 G5   Mac OS X (10.4.3)   30" Apple Cinema Display

    Thanks for the suggestions. I have not yet tried laying a solid black video track underneath to see what it does, but it seems like a good idea and I'll try it out to see what happens when I get back home.
    I'll try to explain what I mean by the image looking wrong.
    I'm picking up where another left off, so I'm not sure of how he cut the quicktime movie together; all I know is that they used alpha channels in Photoshop and After Effects to make the image looks the way they want it. This is a drawn character laid on a white background with a black frame around the entire image. It looks the way he wants it to in the quicktime movie, and this quicktime movie is 720x480, animation millions colors +, 24fps.
    This movie, along with others of the like, need to be cut together in FCP and then put on a DVD with DVDSP. When I export it and it looks "wrong", what's happening is there is a black block behind the drawn character. The guy that made the movies in AE says that, that is what it looks like when the alpha channel is not working correctly.
    To test things, I've changed the quicktime compression settings in the sequence settings. If I set it to anything that is not animation, I get that black block in the viewer. (Note though, that if I set it to animation, millions + or not +, it shows the alpha correctly both ways).
    In FCP's user manual it says that if you're passing your movie on to a DVD, to use a high or lossless compression to keep the quality up, like animation or PhotoJPEG. For this reason, I haven't wanted to go to DV - especially with this type of image (graphic drawn shapes), it's easy to see a quality difference.
    It really seems like there is a lot of voodoo involved with compression settings. As for now the best "fool-proof" solution I've found is to re-render the movie in After Effects at millions (not+) so that it won't contain the alpha channel info, and FCP seems to like that a lot more.
    I just wish I could get FCP to work with the movies as they were because I'm having to re-edit everything to work with these new movies now.
    Thanks again for the tips and insight.
    Quad-core 2.5 G5 Mac OS X (10.4.3) 30" Apple Cinema Display
    Quad-core 2.5 G5   Mac OS X (10.4.3)   30" Apple Cinema Display

  • Help required - animation created in edge animate not working on chrome mobile

    Hi,
    Here is the link :
    www.knowledge-hive.com
    The animation is working well on default mobile browsers for android and iOS but it is not working on chrome mobile. Has anybody faced a similar issue?
    Thanks,
    Ankur

    Actually yes...!
    Failed to load resource: net::ERR_FILE_NOT_FOUND file://www.youtube.com/player_api
    But why only when opening the HTML directly...?
    There is another error...maybe this is the problem source:
    Uncaught SecurityError: Blocked a frame with origin "https://www.youtube.com" from accessing a frame with origin "http://localhost:54321". The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http". Protocols must match.

  • Adding an Icon to a JButton Component - Not working

    Hi all,
    Please help me by saying, why the below gevon SSCE doesnt work.
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Container;
    import java.awt.Dimension;
    import java.awt.event.ActionEvent;
    import javax.swing.AbstractAction;
    import javax.swing.AbstractButton;
    import javax.swing.Action;
    import javax.swing.BorderFactory;
    import javax.swing.Icon;
    import javax.swing.ImageIcon;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.UIManager;
    public class CreateWindow {
        public CreateWindow(String module, String id){
             if(module.equals("mail")){
                  JPanel mail = new JPanel(null);
                  mail.setPreferredSize(new Dimension(500, 350));
                  //Color colr = new Color(222, 236, 255);
                  mail.setBackground(Color.WHITE);
                  JLabel file = new JLabel("File Name:");
                  file.setBounds(18,25,75,50);
                  // Retrieve the icon
                 Icon icon = new ImageIcon("ei0021-48.gif");
                 // Create an action with an icon
                 Action action = new AbstractAction("Button Label", icon) {
                     // This method is called when the button is pressed
                     public void actionPerformed(ActionEvent evt) {
                         // Perform action
                 // Create the button; the icon will appear to the left of the label
                 JButton button = new JButton(action);
                  mail.add(button);
                  buildGUI(mail,500, 350);
        public void buildGUI(JPanel panel, int width, int height)
            JFrame.setDefaultLookAndFeelDecorated(true);
            UIManager.put("activeCaption", new javax.swing.plaf.ColorUIResource(Color.LIGHT_GRAY));
            JFrame f = new JFrame("Propri�t�s:");
            f.setIconImage(new ImageIcon("save.gif").getImage());//need an image file with black background
            changeButtonColor(f.getComponents());
            f.getContentPane().setBackground(Color.WHITE);
            f.getContentPane().add(panel);
            f.getRootPane().setBorder(BorderFactory.createLineBorder(Color.PINK,2));
            f.setSize(width,height);
            f.setLocationRelativeTo(null);
            f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
            f.setVisible(true);
          public void changeButtonColor(Component[] comps)
            for(int x = 0, y = comps.length; x < y; x++)
              if(comps[x] instanceof AbstractButton)
                ((AbstractButton)comps[x]).setBackground(Color.LIGHT_GRAY);
                ((AbstractButton)comps[x]).setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY));
              else if (comps[x] instanceof Container)
                changeButtonColor(((Container)comps[x]).getComponents());
    }I call the above given class constructor as given
    public class Test {
         public static void main(String args[]){
              CreateWindow cw = new CreateWindow("mail","Test.doc");
    }Rony

    RonyFederer wrote:
    I have the images and class files inside
    F:\Testing3\Application\src\booodrive
    Do you have the class files or java files here?
    You should put the gif where the .class files are located, and use getResource as Encephalopathic wrote, or:
    Icon icon = new ImageIcon(ClassLoader.getSystemResource("ei0021-48.gif"));
    When I did as you said using System.out.println(new File("ei0021-48.gif").getAbsolutePath());, I got the following output.
    F:\Testing3\Application\ei0021-48.gif
    That's the current running directory.

  • I play a game on Facebook called cityville. All the animations in the game do not work. Zynga told me that it is possible that my version of Firefox is too new. What does that mean and how do I correct it?

    I started using IE but it was very slow. Then someone suggested Google Chrome but I had the same problem. I then decided to reinstall Firefox again.
    This is a weird thing. My animations were working. These animations are connected to decoration items. They start working and then stop while the game continues to load.
    There are some animations from Zynga that do work all the time but not the ones I speak of.
    I ask others if they are having this problem but they say they aren't. I'm getting paranoid!

    The following support articles should help:
    * https://support.mozilla.com/kb/Could+not+initialize+the+browser+security+component
    * https://support.mozilla.com/kb/AUS+Update+XML+File+Malformed+200

  • Gif with clear background not working

    Ok, so I have to do a workshop that I have done numerous times before through Keynote. I upgraded to Keynote 08. Now, any .gif file that is in my presentation has a solid white background. I get my files from animationfactory.com and they have clear backgrounds. I have downloaded and reinserted, yet i still get a solid white background. When I open it in the old Keynote there are no solid white backgrounds. Anyone know if this is a bug or if it can be fixed??

    Ok, a little more information, but still no solution. It's coming in as a QuickTime movie, BUT it seems there may be something different about how the iWork apps do transparency now. Previously, (since this still works in iWork '06) they may have performed the transparency themselves. Now it appears that it's adhering to the transparency/mask that's in QuickTime and QT doesn't have the right info...
    If you've got QuickTime Pro, you can play around with the transparency settings, but I haven't gotten too far with those for animated objects. For non-animated, if you convert the non-white portion to a solid black shape, you should get the effect you want, BUT it'd have to be done for EACH .gif. I'm going to check to see if these graphics will then work in iWork '06.
    Annd, yes, it will work. I'm hoping something comes up in the interim that allows the regular .gif's to work. (Just to clarify -for myself LOL!- Because I can create a QuickTime masked gif that DOES work as expected perhaps QuickTime needs to read this info from the .gif when importing it and place it as the mask)
    Message was edited by: Kyn Drake

  • Adobe edge header animation in muse scroll effect not working

    Hey folks any help would be greatly appreciated.
    I have a black rectangle animated in edge, which simply moves from off screen onto screen from top to bottom, which I place into muse, the idea is that when you scroll down the edge animation will play and thus a navigation header will appear from top to bottom.
    It works... kinda.
    I can get it to animate down with the scroll function on auto play, and the key position on the top of the browser but when I scroll back up it jut cuts off screen it doesn't play backward. (autoplay selected)
    When I select advance 1 second every 50 pixels or so it just goes haywire and jumps between layer position and visibility and animation frame! it is severely broken when using advance 1 second function.
    My animation is just 2 key frames over 1 second.
    Thanks for any help or suggestions.

    Hello,
    I am unable to identify the root cause from the URL. I would really appreciate if you could share the muse file with me so that i can get in to the depth of the issue.
    Regards
    Vivek

  • Gif image button/javascript not work in mac firefox

    I have a GIF with an image map over it that launches a new
    page with Javascript. It appears and workd fine in all browsers pc
    and mac apart from firefox on a Mac where it does not appear.
    Any ideas?
    Thanks

    Vasilius,
    The following is a general list of things you may try when the issue is not in a specific file (you may have tried/done some of them already); 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to 3 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • Blur animator applied to text is not working

    I have some extruded text that I'm trying to blur on.  I've created an opacity animator and added blur, taking the blur up to 300.  But I'm not seeing the blur effect at all.  Is the Ray Tracing render not supporting blur?  Or is there another setting that I've missed?

    It can't exactly trace a blurred line. You can make extruded letters blur though. You just have to precompose and blur the letters in other ways.

  • Multiple layered animation effects in HTML 5 not working

    I created an animation with 2 effects layered on top of each other so an object would from move from position A to B while a second effect scaled the object to reduce in size at the same time. This was just a matter of setting up the two effects in the same space on the animation time line.
    When I output to HTML 5 I only get the motion animation from A to B but not the scale at the same time.
    Are there any known issues with HTML 5 supporting layered multiple animation effects in Captivate 6?
    Best, Steve

    You did use an Effect that is not yet supported for HTML5. The only supported effects are these:
    Entrance
    - Fly-in (all)
      - Ease-in (all)
    Exit
      - Fly-out (all)
      - Ease-out (all)
    Motion Path
      - Left-to-Right
      - Left-to-Right Ease
      - Pentagon
      - Rectangle
      - Right-to-left easeRight-to-left3point
      - RightToLeft
      - Triangle
      - ZigZag

Maybe you are looking for

  • Checklist for making transition from local testing server to remote

    Does anyone know of any resources which take one through the necessary steps required in putting an ADDT-built site to a remote server? I test on XAMPP (basic) and am dreading the errors I will discover when I actually put one of these sites to serve

  • Help connecting new iPod Nano to iHome radio

    I got an iHome radio with a iPod Nano recharge station (and Nano played through radio's speakers). When I lost that, I got a new Nano, but the belt clip means I cannot push down so that the Nano's insie port connects with the iHome's outsie port. Is

  • COM+ error since install of power management 1.40

    Hello, I'm running a T60p with XP Pro SP3, since I've upgraded to power management 1.40, my eventlog contains lot of error similar to this one : "Le système d'événements de COM+ n'a pas pu déclencher la méthode StartShell de l'abonnement {F6FE5592-FC

  • I'm having troubles installing Adobe Acrobat DC.

    I've done the uninstall and rebooted. the new install gets to 42% the stops overtime i try. I then get this error... Exit Code: 7 Please see specific errors below for troubleshooting. For example, ERROR: DW013 ... ------------------------------------

  • BW-CRM integration material - Amit Mishra

    Hi Amit, Please send me the BW-CRM integration documents to my email [email protected] Will reward points. Thanks in advance Sanju