加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

e804. 显示JProgressBar的完成百分率

发布时间:2020-12-14 03:46:54 所属栏目:大数据 来源:网络整理
导读:The progress bar offers the ability to display the actual value of the bar as a percentage. This example demonstrates how to enable this display. Note: The percentage display should not be enabled when the maximum is not known ( e802 创建

The progress bar offers the ability to display the actual value of the bar as a percentage. This example demonstrates how to enable this display.

Note: The percentage display should not be enabled when the maximum is not known (e802 创建一个位置大小的JProgressBar组件).

    // Create a horizontal progress bar
    int minimum = 0;
    int maximum = 100;
    JProgressBar progress = new JProgressBar(minimum,maximum);
    
    // Overlay a string showing the percentage done
    progress.setStringPainted(true);

?

Related Examples

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读