简体   繁体   中英

Java ProgressBar gui builder netbeans

I want to use ProgressBar from netbeans GUI builder.
Any example will be appreciated.
thanks

Sun/ Orcale's Java Tutorial is always good start to look for such information:

http://download.oracle.com/javase/tutorial/uiswing/components/progress.html

Heres a simple ProgressBar Demo Program

package test;

import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JProgressBar;

public class ProgressBarDemo {

    JFrame frame;
    JProgressBar progressBar;

    public ProgressBarDemo() {
        frame = new JFrame("ProgressBarDemo");
        frame.setSize(400, 400);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        progressBar = new JProgressBar();
        progressBar.setValue(40);
        frame.getContentPane().add(progressBar,BorderLayout.SOUTH);
        frame.setVisible(true);
    }

    public static void main(String[] args) {
        new ProgressBarDemo();
    }

}

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