Java: JProgressBar

牧云@^-^@ 提交于 2020-01-15 09:45:28

问题


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


回答1:


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




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/1632930/java-jprogressbar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!