FileDocCategorySizeDatePackage
ProgressMonitorExample.javaAPI DocExample1522Thu Oct 24 20:14:22 BST 2002None

ProgressMonitorExample

public class ProgressMonitorExample extends JFrame implements ActionListener

Fields Summary
static ProgressMonitor
pbar
static int
counter
Constructors Summary
public ProgressMonitorExample()


    
    super("Progress Monitor Demo");
    setSize(250,100);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    pbar = new ProgressMonitor(null, "Monitoring Progress",
           "Initializing . . .", 0, 100);

    // Fire a timer every once in a while to update the progress.
    Timer timer = new Timer(500, this);
    timer.start();
    setVisible(true);
  
Methods Summary
public voidactionPerformed(java.awt.event.ActionEvent e)

    // Invoked by the timer every half second. Simply place
    // the progress monitor update on the event queue.
    SwingUtilities.invokeLater(new Update());
  
public static voidmain(java.lang.String[] args)

    UIManager.put("ProgressMonitor.progressText", "This is progress?");
    UIManager.put("OptionPane.cancelButtonText", "Go Away");
    new ProgressMonitorExample();