开发者

Busy graphic on a tab of a JTabbedPane

does anybody know of any open source implementation of a JTabbedPane in which I can set a busy graphic (say spinning ball) on the tab, while I load something into the tab - much like the spinner on Firefox tabs.

I real开发者_运维知识库ize I could do this by hand by creating an animated GIF and setting it as an icon on the tab - but i was hoping that there'd be something that already did this.


Netbeans supports busy-icons when you create a new Desktop Application.
I zipped them and uploaded them.
Here is the link.

With this icons you can make a thread witch update the icon by calling.
JTabbedPane.setIconAt(int tabnumber, Icon icon);
See the method documentation: javax.swing.JTabbedPane.setIconAt(int index, Icon icon).

Hope this helps


I'd stick to the GIF89a idea. You'll need the single images, that are displayed in the animation, anyway, so why not wrapping them up into GIF89a (assuming that swing supports animated GIF on tabs) instead of flipping them manually (and fighting the Swing threading challenge)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜