Re: Animated icon for a TopComponent

Paco Barrera <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <CAFS-qL=_T8vGBiR92taTUY_hurLd5tmSjJU4ea5G10bJ=jqYKA@mail.gmail.com>
Yes, this is the first attempt to do it, but this icon it cannot be
changed, isnt it?

I'm triying now override the paintIcon method. I think this can be the
solution to get a custom animated icon.

Thanks very much.

2016-04-26 16:06 GMT+02:00 Dmitry Avtonomov <[email protected]>:

> Look into TC.setBusy() method, it plays an animated indefinite progress
> bar in the tab of the TC.
>
> Dmitry
> On Apr 26, 2016 05:44, "Paco Barrera" <[email protected]> wrote:
>
>> It is possible to set an animated image to a TopComponent?
>>
>> I've tested to assign an animated gif in this way but not success:
>> [code]
>> TopComponent tc = WindowManager.getDefault().getRegistry().getActivated();
>>                             String ICON_ANIMATED =
>> "file:/com/aws/experiment/resources/expRunning.gif";
>>                             Image iconAnimated;
>>                             try {
>>                                 iconAnimated = new ImageIcon(new
>> URL(ICON_ANIMATED)).getImage();
>>                                 tc.setIcon((Image) iconAnimated);
>>                             } catch (MalformedURLException ex) {
>>                                 Exceptions.printStackTrace(ex);
>>                             }
>> [/code]
>>
>>
>> Any help is appreciated.
>>
>>
>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Libre
>> de virus. www.avast.com
>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
>> <#m_-8071167316195754084_m_8947346349863053241_DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.