开发者

Overlaying several JProgressBars?

开发者 https://www.devze.com 2023-03-12 07:15 出处:网络
I\'d like to have a JProgressBar that is actually several JProgressBars layered together. Does such an implementation exist? I\'d like to know before I crack out Flithy Rich Clients and try to put one

I'd like to have a JProgressBar that is actually several JProgressBars layered together. Does such an implementation exist? I'd like to know before I crack out Flithy Rich Clients and try to put one together.

Here is my problem: I have a bunch of object开发者_Python百科s that transition linearly through several states (4 in my case, but that is arbitrary). And I'd like to show, on one (composite) progress bar how many of each of the objects, relatively, has made it to each state. The state transitions are purely linear from start to end, so there are never more objects state N + 1 than have been in state N.

I'm picturing a progress bar with four colors and all four bars increase from left to right, eventually ending with the color for the 4th state covering the entire progress bar.


There is not a specific component that does exactly what you describe. However you could create on instance of a progress bar for each state, plus one composite bar that shows total progress. This would be as close as you could get with the standard components.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号