e801. 创建一个JProgressBar组件

A progress bar is used to visually indicate how much a task has been progressed. A progress bar can be oriented horizontally (left-to-right) or vertically (bottom-to-top). By default, the orientation is horizontal.

See also e806 创建进程监听对话框.

    // Create a horizontal progress bar
    int minimum = 0;
    int maximum = 100;
    JProgressBar progress = new JProgressBar(minimum, maximum);
    
    // Create a vertical progress bar
    minimum = 0;
    maximum = 100;
    progress = new JProgressBar(JProgressBar.VERTICAL, minimum, maximum);

 

Related Examples
posted @ 2018-09-06 08:57  borter  阅读(132)  评论(0编辑  收藏  举报