Gallery newG = new Gallery(mainFrame);
Gallery newG = new Gallery(mainFrame.jStatusBar);
	public void actionPerformed(ActionEvent e) {		String cmd = e.getActionCommand();		Gallery g = (Gallery) jGalleries.getSelectedValue();		Log.log(Log.INFO, MODULE, "Command selected " + cmd + " Gallery: " + g);		if (cmd.equals("Modify")) {			GalleryEditorDialog ged = new GalleryEditorDialog(dialog, g);			if (ged.isOK()) {				//jGalleries.repaint();				int i = mainFrame.galleries.getIndexOf(g);				mainFrame.galleries.removeElementAt(i);				mainFrame.galleries.insertElementAt(g, i);			}		} else if (cmd.equals("New")) {			Gallery newG = new Gallery(mainFrame);			GalleryEditorDialog ged = new GalleryEditorDialog(dialog, newG);			if (ged.isOK()) {				mainFrame.galleries.addElement(newG);				jGalleries.setSelectedValue(newG, true);				resetUIState();			}		} else if (cmd.equals("Delete")) {			int n = JOptionPane.showConfirmDialog(this, "Are you sure you want to discard login information for '" + g.getStUrlString() + "'?",					"Delete Gallery",					JOptionPane.WARNING_MESSAGE,					JOptionPane.YES_NO_OPTION);			if (n == JOptionPane.YES_OPTION) {				mainFrame.removeGallery(g);			}		} else if (cmd.equals("GalleryEditorDialog")) {			Gallery newG = (Gallery) e.getSource();			if (mainFrame.galleries.getIndexOf(newG) == -1) {				mainFrame.galleries.addElement(newG);				jGalleries.setSelectedValue(newG, true);			}			resetUIState();		} else {			Log.log(Log.ERROR, MODULE, "Unknown command: " + cmd);		}	}