www.pudn.com > ProgressSample.rar > ProBar.java, change:2006-04-09,size:687b


import javax.swing.*; 
 
public class ProBar extends JFrame { 
  public ProBar() { 
    this.setSize(300,300); 
    this.setTitle("½ψ¶ΘΜυΡέΚΤ"); 
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 
    this.setResizable(false); 
    this.drawProgressBar(); 
    this.setVisible(true); 
  } 
  public static void main(String[] args) { 
    ProBar proBar1 = new ProBar(); 
  } 
  void drawProgressBar(){ 
  JPanel jp=new JPanel(); 
  JProgressBar progreBar=new JProgressBar(JProgressBar.HORIZONTAL,0,100); 
  int value = progreBar.getValue(); 
  progreBar.setValue(value++); 
  progreBar.setStringPainted(true); 
  jp.add(progreBar); 
  this.getContentPane().add(jp); 
 
 
  } 
 
}