简体   繁体   中英

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

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

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: h ttp://today.java.net/pub/a/today/2007/02/22/how-to-write-custom-swing-component.html

They're pretty old, but still applicable.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM