       (.setRowSelectionAllowed false)
       (.setFocusable false)
       (.. getColumnModel (getColumn 0) (setMinWidth 20))
-      (.. getColumnModel (getColumn 0) (setMaxWidth 20))
-    ; (.. getColumnModel (getColumn 1) (setMaximumWidth 20))
-    ; (.setAutoResizeMode JTable/AUTO_RESIZE_LAST_COLUMN))
-    )
+      (.. getColumnModel (getColumn 0) (setMaxWidth 20)))
+      (.addTableModelListener model
+        (reify TableModelListener
+          (tableChanged [_ e]
+            (dorun (map #(update-column model %)
+              (range (.getFirstRow e) (inc (.getLastRow e))))))))
     (doseq [tag tags]
       (.addRow model (Vector. [false tag])))
     table))

                     "Please add a location to scan for files")]
    (add-location (.getAbsolutePath loc))))

(defn create-column-table []
  (let [table (proxy [JTable] [0 2]
                (isCellEditable [_ i] (get [true false] i)))
        model (proxy [DefaultTableModel] [0 2]
                (getColumnClass [i]

        (changedUpdate [_ _] (f))
        (removeUpdate [_ _] (f))))))

(defn get-model-column-index [table text]
  (let [table-model (.getModel table)]
    (-> (vec
      (for [i (range (.getColumnCount table-model))]
        (.getColumnName table-model i)))
      (.indexOf text))))

(defn open-selected-files [table]
  (let [path-column (get-model-column-index table "Path")]
    (doseq [i (.getSelectedRows table)]
      (.openAcquisitionData gui
        (.getValueAt table i path-column)))))

(defn listen-to-open [table]
  (.addMouseListener table
