Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * To change this template, choose Tools | Templates
   * and open the template in the editor.
   */
  
  /*
   * ProgressDialog.java
   *
   * Created on 11.04.2010, 15:57:56
  */
 
 package ch.tatool.core.module.creator;
 
 import java.awt.Image;

Author(s):
Michael Ruflin
 
 public class ProgressDialog extends javax.swing.JDialog {
 
 	private static final long serialVersionUID = 1552712738457326859L;

Creates new form ProgressDialog
 
     public ProgressDialog(java.awt.Frame parentboolean modal) {
         super(parentmodal);
         initComponents();
         setLocationRelativeTo(null);
         java.net.URL iconUrl = this.getClass().getResource("/ch/tatool/app/gui/icon.png");
 		Image icon = getToolkit().getImage(iconUrl); 
 		setIconImage(icon);
     }
 
     public void setMinimum(int min) {
         .setMinimum(min);
     }
     public void setMaximum(int max) {
         .setMaximum(max);
     }
     public void setValue(int value) {
         .setValue(value);
     }
     public void setIndeterminate(boolean indeterminate) {
         .setIndeterminate(indeterminate);
     }
     public void setLabel(String label) {
         .setText(label);
     }

    
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
 
     // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
     private void initComponents() {
 
          = new javax.swing.JPanel();
          = new javax.swing.JProgressBar();
          = new javax.swing.JLabel();
 
         setTitle("Tatool");
 
         .setBorder(javax.swing.BorderFactory.createEmptyBorder(20, 40, 20, 40));
         .setLayout(new java.awt.BorderLayout(10, 10));
 
         .setIndeterminate(true);
 
 
 
         pack();
     }// </editor-fold>//GEN-END:initComponents
 
    

Parameters:
args the command line arguments
 
     public static void main(String args[]) {
         java.awt.EventQueue.invokeLater(new Runnable() {
             public void run() {
                 ProgressDialog dialog = new ProgressDialog(new javax.swing.JFrame(), true);
                 dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                     public void windowClosing(java.awt.event.WindowEvent e) {
                         System.exit(0);
                     }
                 });
                 dialog.setVisible(true);
             }
         });
     }
 
     // Variables declaration - do not modify//GEN-BEGIN:variables
     private javax.swing.JPanel jPanel1;
     private javax.swing.JProgressBar progressBar;
     private javax.swing.JLabel statusLabel;
     // End of variables declaration//GEN-END:variables
New to GrepCode? Check out our FAQ X