synchronized (this) { count++; }  SwingUtilities.invokeLater(new Runnable() { public void run() { int count = getCount(); int goal = getGoal(); countValueLabel.setText(count+"/"+goal); progressBar.setValue(count);
synchronized (this) { count++; }  SwingUtilities.invokeLater(new Runnable() { public void run() { int count = getCount(); int goal = getGoal(); countValueLabel.setText(count + "/" + goal); progressBar.setValue(count); } });
	private void step() {	    synchronized (this) {		count++;	    }	    	    SwingUtilities.invokeLater(new Runnable() {		public void run() {		    int count = getCount();		    int goal = getGoal();		    countValueLabel.setText(count+"/"+goal);		    progressBar.setValue(count);		}	    });	}