boolean forward = true; while (! interrupted() ) { if (jProgress.getValue() >= jProgress.getMaximum()) { forward = false; } else if (jProgress.getValue() <= jProgress.getMinimum()) { forward = true; }
jUploadButton.setEnabled( getCurrentAlbum() != null && getCurrentAlbum().sizePictures() > 0 && !inProgress && jAlbumCombo.getSelectedIndex() >= 0 );
				public void run() {					boolean forward = true;					while (! interrupted() ) {						if (jProgress.getValue() >= jProgress.getMaximum()) {							forward = false;						} else if (jProgress.getValue() <= jProgress.getMinimum()) {							forward = true;						}						updateProgressValue(progressId, jProgress.getValue() + (forward?1:-1));						try {							sleep(500);						} catch (InterruptedException e) {}					}				}