更改 JProgressBar
注意到这个链接后: http://www .newscientist.com/blogs/nstv/2010/12/best-videos-of-2010-progress-bar-illusion.html 我想让我的 jprogressbar 看起来像那样。我该怎么做呢?是否有图书馆已经为我做到了这一点?
After noticing this link:
http://www.newscientist.com/blogs/nstv/2010/12/best-videos-of-2010-progress-bar-illusion.html
I wanted to make my jprogressbar look like that. How would I go about doing that? Is there a library that already does that for me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
简短的回答 - 创建自定义 ProgressBarUI (重载 BasicProgressBar 最简单的使用)并重写 PaintDeterminate 方法。
更长的答案 - 我正在尝试如何执行此操作,将创建一个包含源代码的博客文章并链接回此处。
编辑:我现在可以使用了。这是示例视频
代码可用github 上
要关注的博客文章。
Short answer - create a custom ProgressBarUI (overload BasicProgressBar for easiest use) and override the paintDeterminate method.
Longer answer - I'm in middle of experimenting exactly how you'd do this, will create a blog post with source code and link back to it here.
Edit: I have it working now. Here's a sample video
Code is available on github
Blog post to follow.
首先,视频不可用,其次是幻觉,就像Vista和7的栏一样,因为它有一个动画,使它看起来像是在前进,如果不是,你可以尝试重新创建Vista o 7, Java 上的进度条。
如果您再次发现该视频有效,我们可以考虑重新创建它的方法
First of all, the video is unavailable, second is an illusion, is like the bar of Vista and 7, since it has an animation that makes it look like it's advancing, when it's not, you could try to recreate the Vista o 7, progress bar on Java.
If you find the video working, again, we can think on a way to re-create it