         row-sorter (doto (TableRowSorter. table-model)
                      (.setComparator 1 local-date-comparator)
                      (.setSortable 2 false))]
-    (doto (ui/table :model table-model
-                    :show-vertical-lines? false)
+    (doto (swing/table :model table-model
+                       :show-vertical-lines? false)
       (.setRowSorter row-sorter)
       (set-column-width 0 230)
       (set-column-width 1 100)

  (keyword (str "resultscombo" tournament-id)))

(defn disable-buttons [tournament-id]
  (doseq [btn (ui/select (ui/to-root tabbed-pane) [(id->selector (tab-id tournament-id)) :JButton])]
    (ui/config! btn :enabled? false))
  (-> (ui/select (ui/to-root tabbed-pane) [(id->selector (reset-button-id tournament-id))])
    (ui/config! :enabled? true)))

(defn update-pairings-combo [tournament-id]
  (let [combo (ui/select (ui/to-root tabbed-pane) [(id->selector (pairings-combo-id tournament-id))])
        cnt (watcher/get-pairings-count tournament-id)]
    (ui/config! combo :model (range 1 (inc cnt)))
    (ui/selection! combo (long cnt))))

(defn update-results-combo [tournament-id]
  (let [combo (ui/select (ui/to-root tabbed-pane) [(id->selector (results-combo-id tournament-id))])
        cnt (watcher/get-results-count tournament-id)]
    (ui/config! combo :model (range 1 (inc cnt)))
    (ui/selection! combo (long cnt))))

(defn enable-buttons [tournament-id]
  (let [root (ui/to-root tabbed-pane)] 
    (when (watcher/get-tournament tournament-id)
      (-> (ui/select root [(id->selector (tournament-button-id tournament-id))])
        (ui/config! :enabled? true)))
    (when (watcher/get-teams tournament-id)
      (-> (ui/select root [(id->selector (teams-button-id tournament-id))])
        (ui/config! :enabled? true)))
    (when (watcher/get-seatings tournament-id)
      (-> (ui/select root [(id->selector (seatings-button-id tournament-id))])
        (ui/config! :enabled? true)))
    (when (pos? (watcher/get-pairings-count tournament-id))
      (-> (ui/select root [(id->selector (pairings-button-id tournament-id))])
        (ui/config! :enabled? true)))
    (when (pos? (watcher/get-results-count tournament-id))
      (-> (ui/select root [(id->selector (results-button-id tournament-id))])
        (ui/config! :enabled? true))
      (-> (ui/select root [(id->selector (publish-button-id tournament-id))])
        (ui/config! :enabled? true)))
    (-> (ui/select root [(id->selector (reset-button-id tournament-id))])
      (ui/config! :enabled? true))
    (-> (ui/select root [(id->selector (check-button-id tournament-id))])
      (ui/config! :enabled? true))))

(defmacro upload [action done tournament-id & params]
  `(fn [_#]

  (let [name (:name (watcher/get-tournament tournament-id))] 
    (if track?
      (.addTab tabbed-pane name (create-tab tournament-id))
      (let [tab (swing/select (swing/to-root tabbed-pane) [(id->selector (tab-id tournament-id))])]
        (.remove tabbed-pane tab)))))

(defn tournament-table-model [tournaments]
