    (let [sp (JScrollPane. table)]
     sp))
 
+(defn update-table [table]
+  (doto (.getModel table)
+    .fireTableDataChanged
+    .fireTableStructureChanged)
+  table)
+
 ;; events
 
 (defn attach-double-click-listener [component f]


(def group-data (atom nil))

(def widgets (atom nil))

(defn get-selected-group []
  (let [row (.getSelectedRow (@widgets :groups-table))

    (start nil))
  ([group]
    (when-let [frame (:frame @widgets)]
      (edt (try (doto frame .hide .dispose) (catch Throwable _))))
    (reset! widgets (show))
    (update-groups)
    (activate-groups-table @widgets)))
