Java:JProgressBar

发布于 2024-08-09 06:50:40 字数 215 浏览 2 评论 0原文

是否可以用Java制作一个进度条,如本页所示? 图片
所以,不是默认的进度条“filling-way”。

如果是这样,怎么办?

谢谢

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

还给你自由 2024-08-16 06:50:40

我自己找到的。只需调用setInminated(true);!!

我在 java2s 上找到了它

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

I found it on java2s

酷遇一生 2024-08-16 06:50:40

你必须对paint或paintComponent方法进行一些邪恶的重写(我忘记了到底是哪一个),但是是的,这是可能的。最好的方法是查看有关自定义 swing 组件的现有教程:http://today.java.net/pub/a/today/2007/02/22/how-to-write-custom-swing-component.html

它们已经很老了,但仍然适用。

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.

爱要勇敢去追 2024-08-16 06:50:40

我认为最简单的方法是编写自己的自定义组件。另一种选择是自定义外观和感觉(其中涉及大量工作),但使用您自己的不确定动画编写自定义组件应该不会太困难,该组件与您在其中看到的非常相似。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文