try { sleep(500); } catch (InterruptedException e) {}
if (getCurrentGallery().getUsername() != null && getCurrentGallery().hasComm() && getCurrentGallery().getComm(MainFrame.this).isLoggedIn()) { jLoginButton.setText("Log out"); } else { jLoginButton.setText("Log in"); }   boolean enabled = ! inProgress && getCurrentAlbum() != null && jAlbumCombo.getModel().getSize() >= 1; jBrowseButton.setEnabled( enabled ); jPictureInspector.setEnabled( enabled ); jPicturesList.setEnabled( enabled ); jAlbumCombo.setEnabled( enabled ); jNewAlbumButton.setEnabled( !inProgress && getCurrentGallery().hasComm() && getCurrentGallery().getComm(MainFrame.this).hasCapability(GalleryCommCapabilities.CAPA_NEW_ALBUM));   int sel = jPicturesList.getSelectedIndex();   if ( GalleryRemote.getInstance().properties.getShowPreview() ) { if ( sel != -1 ) { previewFrame.displayFile( getCurrentAlbum().getPicture( sel ) ); } else { previewFrame.displayFile( null ); }  if ( !previewFrame.isVisible() ) { previewFrame.setVisible( true );
				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) {}					}				}