Index: trunk/gli/src/org/greenstone/gatherer/gui/MetaEditPane.java
===================================================================
--- trunk/gli/src/org/greenstone/gatherer/gui/MetaEditPane.java	(revision 4321)
+++ trunk/gli/src/org/greenstone/gatherer/gui/MetaEditPane.java	(revision 4322)
@@ -467,4 +467,20 @@
 		  table.setColumnSelectionAllowed(false);
 
+		  // The default JTable doesn't quite have the desired properties - when a
+		  // table cell is clicked on, the table is scrolled so the cell is as
+		  // visible as possible. This means that the left-most cells can become
+		  // hidden. To fix this, the MouseInputHandler in BasicTableUI is removed
+		  // as a MouseListener on the table, and a very slightly altered copy is
+		  // added in its place (TableMouseInputHandler).
+		  MouseListener[] mls = table.getMouseListeners();
+		  for (int i = 0; i < mls.length; i++) {
+		      // Remove the instances of MouseInputHandler
+		      if (mls[i].toString().startsWith("javax.swing.plaf.basic.BasicTableUI$MouseInputHandler@")) {
+			  table.removeMouseListener(mls[i]);
+		      }
+		  }
+		  // Add the slightly-altered mouse listener
+		  table.addMouseListener(new TableMouseInputHandler());
+
 		  JScrollPane table_scroll = new JScrollPane(table);
 		  table_scroll.getViewport().setBackground(Gatherer.config.getColor("coloring.collection_tree_background", false));
@@ -792,4 +808,129 @@
     }
 
+
+    /** A direct copy of javax.swing.plaf.basic.BasicTableUI$MouseInputHandler, except for one change in adjustFocusAndSelection(). The purpose of this change is to always keep the left-most cells of the table row selected visible. */
+    private class TableMouseInputHandler implements MouseInputListener
+    {
+        // Component receiving mouse events during editing.
+        // May not be editorComponent.
+        private Component dispatchComponent;
+	private boolean selectedOnPress;
+
+	//  The Table's mouse listener methods.
+
+        public void mouseClicked(MouseEvent e) {}
+
+        private void setDispatchComponent(MouseEvent e) {
+            Component editorComponent = table.getEditorComponent();
+            Point p = e.getPoint();
+            Point p2 = SwingUtilities.convertPoint(table, p, editorComponent);
+            dispatchComponent = SwingUtilities.getDeepestComponentAt(editorComponent,
+                                                                 p2.x, p2.y);
+        }
+
+        private boolean repostEvent(MouseEvent e) {
+	    // Check for isEditing() in case another event has
+	    // caused the editor to be removed. See bug #4306499.
+            if (dispatchComponent == null || !table.isEditing()) {
+                return false;
+            }
+            MouseEvent e2 = SwingUtilities.convertMouseEvent(table, e, dispatchComponent);
+            dispatchComponent.dispatchEvent(e2);
+            return true;
+        }
+
+        private void setValueIsAdjusting(boolean flag) {
+            table.getSelectionModel().setValueIsAdjusting(flag);
+            table.getColumnModel().getSelectionModel().setValueIsAdjusting(flag);
+        }
+
+	private boolean shouldIgnore(MouseEvent e) {
+	    return e.isConsumed() || (!(SwingUtilities.isLeftMouseButton(e) && table.isEnabled()));
+	}
+
+        public void mousePressed(MouseEvent e) {
+	    if (e.isConsumed()) {
+		selectedOnPress = false;
+		return;
+	    }
+	    selectedOnPress = true;
+	    adjustFocusAndSelection(e);
+	}
+
+	void adjustFocusAndSelection(MouseEvent e) {
+	    if (shouldIgnore(e)) {
+	        return;
+	    }
+
+            Point p = e.getPoint();
+            int row = table.rowAtPoint(p);
+            int column = table.columnAtPoint(p);
+	    // The autoscroller can generate drag events outside the Table's range.
+            if ((column == -1) || (row == -1)) {
+                return;
+            }
+
+            if (table.editCellAt(row, column, e)) {
+                setDispatchComponent(e);
+                repostEvent(e);
+            }
+	    else if (table.isRequestFocusEnabled()) {
+                table.requestFocus();
+	    }
+
+            CellEditor editor = table.getCellEditor();
+            if (editor == null || editor.shouldSelectCell(e)) {
+		boolean adjusting = (e.getID() == MouseEvent.MOUSE_PRESSED) ? true : false;
+                setValueIsAdjusting(adjusting);
+                table.changeSelection(row, 0, e.isControlDown(), e.isShiftDown());
+                // table.changeSelection(row, column, e.isControlDown(), e.isShiftDown());
+	    }
+        }
+
+        public void mouseReleased(MouseEvent e) {
+	    if (selectedOnPress) {
+		if (shouldIgnore(e)) {
+		    return;
+		}
+
+		repostEvent(e);
+		dispatchComponent = null;
+		setValueIsAdjusting(false);
+	    } else {
+		adjustFocusAndSelection(e);
+	    }
+        }
+
+
+        public void mouseEntered(MouseEvent e) {}
+
+        public void mouseExited(MouseEvent e) {}
+
+	//  The Table's mouse motion listener methods.
+
+        public void mouseMoved(MouseEvent e) {}
+
+        public void mouseDragged(MouseEvent e) {
+	    if (shouldIgnore(e)) {
+	        return;
+	    }
+
+            repostEvent(e);
+
+            CellEditor editor = table.getCellEditor();
+            if (editor == null || editor.shouldSelectCell(e)) {
+                Point p = e.getPoint();
+                int row = table.rowAtPoint(p);
+                int column = table.columnAtPoint(p);
+	        // The autoscroller can generate drag events outside the Table's range.
+                if ((column == -1) || (row == -1)) {
+                    return;
+                }
+	        table.changeSelection(row, column, false, true);
+            }
+        }
+    }
+
+
 	 /** A listener for right mouse button clicks over the collection tree. */
 	 private class RightButtonListener
