fetch.setText("Log in");
jLoginButton.setText("Log in");
			public void run() {				// if the list is empty or comm, disable upload				upload.setEnabled( mAlbum != null				&& mAlbum.sizePictures() > 0				&& !mInProgress				&& album.getSelectedIndex() >= 0 );				// during comm, don't change Gallery or do any other comm				fetch.setEnabled( !mInProgress );				gallery.setEnabled( !mInProgress );				newGallery.setEnabled( !mInProgress );				username.setEnabled( !mInProgress );				password.setEnabled( !mInProgress );				if (currentGallery.getUsername() != null					&& currentGallery.hasComm()					&& currentGallery.getComm(MainFrame.this).isLoggedIn()) {					fetch.setText("Log out");				} else {					fetch.setText("Log in");				}				// if the selected album is uploading, disable everything				boolean enabled = ! mInProgress && mAlbum != null && album.getModel().getSize() >= 1;				browse.setEnabled( enabled );				pictureInspector.setEnabled( enabled );				picturesList.setEnabled( enabled );				album.setEnabled( enabled );				newAlbum.setEnabled( enabled && currentGallery.hasComm()					&& currentGallery.getComm(MainFrame.this).hasCapability(GalleryCommCapabilities.CAPA_NEW_ALBUM));				// change image displayed				int sel = picturesList.getSelectedIndex();				/*if (mAlbum != null && mAlbum.getSize() < 1) {					// if album was just emptied, it takes a while for the pictureList					// to notice...					// this is fixed by using invokeLater					sel = -1;				}*/				if ( GalleryRemote.getInstance().properties.getShowPreview() ) {					if ( sel != -1 ) {						String filename = ( mAlbum.getPicture( sel ).getSource() ).getPath();						previewFrame.displayFile( filename );					} else {						previewFrame.displayFile( null );					}					if ( !previewFrame.isVisible() ) {						previewFrame.setVisible( true );					}				}				// status				if ( mAlbum == null) {					pictureInspector.setPictures( null );					setStatus( "Select a Gallery URL and click Log in..." );				} else if ( mAlbum.sizePictures() > 0 ) {					pictureInspector.setPictures( picturesList.getSelectedValues() );					int selN = picturesList.getSelectedIndices().length;					if ( sel == -1 ) {						setStatus( mAlbum.sizePictures() + " pictures / "						+ NumberFormat.getInstance().format(						( (int) mAlbum.getPictureFileSize() / 1024 ) )						+ " K" );					} else {						setStatus( "Selected " + selN + ((selN == 1)?" picture / ":" pictures / ")						+ NumberFormat.getInstance().format(						( (int) mAlbum.getObjectFileSize( picturesList.getSelectedValues() ) / 1024 ) )						+ " K" );					}				} else {					pictureInspector.setPictures( null );					setStatus( "No selection" );				}		}});