Package com.util.gui

Examples of com.util.gui.ProgressBarDialog


    final VncViewersList clients= new VncViewersList();
    clients.loadHosts(file, "");
    System.out.println("loaded " + clients.size());

    // set up progress bar window
    final ProgressBarDialog progDlg=
      new ProgressBarDialog(this, PROG_BROADCAST, 0, clients.size());
    progDlg.setModal(true);

    // broadcast to everybody, but do it
    // on the background thread so that we
    // can show a progress dialog
    new Thread() {
      public void run() {
        try {
          VncBroadcaster.broadcast(clients, progDlg.getModel());         
        } catch (final Exception e) {
          System.out.println(e);

          SwingUtilities.invokeLater(new Runnable() {
            public void run() {
              JOptionPane.showMessageDialog(
                  VncEasyBroadcastWindow.this,
                  e.toString());
            }
          });       
        }

        // close the progress dialog on the swing thread
        SwingUtilities.invokeLater(new Runnable() {
          public void run() {
            progDlg.setVisible(false);
          }
        });
      }
    }.start();

    progDlg.setVisible(true);
    this.quit();
  }
View Full Code Here

TOP

Related Classes of com.util.gui.ProgressBarDialog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.