views:

83

answers:

2

Hi, 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 realize 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.

A: 

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)

Andreas_D
+1  A: 

Hi,
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

Martijn Courteaux