我需要一个 Swing 的垂直进度条来显示一种情况下的温度和另一种情况下的电压。我怎样才能做到这一点?
我可以将进度条设置为垂直模式吗?
我能否在其 ID 不可调整的只读模式下使用 slider 控件?当用户试图修改它时,我想我可以简单地将 slider 设置为实际值,但这看起来很笨拙。
有什么建议吗?
最佳答案
根据 Java 教程,How to Use Progress Bars :
JProgressBar(int)
JProgressBar(int, int, int)
- Create a progress bar with the specified orientation, which can be eitherJProgressBar.HORIZONTAL
orJProgressBar.VERTICAL
. The optional second and third arguments specify minimum and maximum values.
关于java - Swing 中的垂直进度条?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2072766/