예제 #1
0
    /** Runs this thread and update the ID column. */
    public void run() {
      while (polling) {
        repaint();

        try {
          Thread.sleep(1000);
        } catch (InterruptedException exception) {
          break;
        }
      }

      repaint();
    }
예제 #2
0
 /**
  * Invoked when one of the menus is selected.
  *
  * @param e contains the selected menu item.
  */
 public void actionPerformed(ActionEvent e) {
   Thread thread = new Thread(this);
   thread.setPriority(Resource.getThreadPriority());
   thread.start();
 }