简体   繁体   中英

Vertical progress bar in swing?

I need a veritical progress bar in swing to display a temperature in one case and a voltage in another. How can I accomplish this?

Can I set the progress bar to a vertical mode?

Can I use the slider control in a read only mode in which it id not adjustable? I was thinking I could simply set the slider to the actual value when the user attempted to modify it but that seems clunky.

Any suggestions?

Per the Java tutorial, How to Use Progress Bars :

JProgressBar(int)
JProgressBar(int, int, int) - Create a progress bar with the specified orientation, which can be either JProgressBar.HORIZONTAL or JProgressBar.VERTICAL . The optional second and third arguments specify minimum and maximum values.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM