Martijn Courteaux
Martijn Courteaux

Reputation: 68847

Java: JProgressBar

Is it possible to make a progressbar in Java like displayed on this page? Image.
So, not the default progressbar "filling-way".

If so, how?

Thanks

Upvotes: 1

Views: 1873

Answers (3)

Martijn Courteaux
Martijn Courteaux

Reputation: 68847

I found it self. Just call setIndeterminate(true);!!
I found it on java2s

Upvotes: 5

jsight
jsight

Reputation: 28409

I think the easiest way would be to write your own custom component. The alternative would be a custom look and feel (there's a lot of work involved in that), but it shouldn't be too difficult to write a custom component with your own indeterminate animation very similar to what you see there.

Upvotes: 0

Malaxeur
Malaxeur

Reputation: 6043

You'd have to do some wicked overriding of either the paint or paintComponent methods (I forget which one exactly), but yeah it's possible. The best way is to look at existing tutorials on custom swing components: http://today.java.net/pub/a/today/2007/02/22/how-to-write-custom-swing-component.html

They're pretty old, but still applicable.

Upvotes: 0

Related Questions