 
 (load-mm)
 
-(defn update-list [list data]
-  (let [model (.getModel list)]
-    (.clear model)
-    (doseq [datum data]
-      (.addElement model datum)))
-  list)
-
-(defn groups []
-  (sort (seq (core getAvailableConfigGroups))))
-
-(defn update-group-list [list]
-  (update-list list (sort (seq (core getAvailableConfigGroups)))))
-
-(defn group-list []
-  (update-group-list (JList. (DefaultListModel.))))
+(def groups (atom nil))
+
+(defn update-groups []
+  (reset! groups (seq (core getAvailableConfigGroups)))
+  (.refreshGUI gui))
 
 (defn presets [group]
   (when-not (empty? group)


(defn add-group [components group]
  (core defineConfigGroup group)
  (update-groups-table (:groups-table components))
  )

(defn rename-group [components group-old group-new]
  (core renameConfigGroup group-old group-new)
  (update-groups-table (:groups-table components))
  )

(defn delete-group [components group]
  (core deleteConfigGroup group)
  (update-groups-table (:groups-table components))
  )

;; editing presets

    (start nil))
  ([group]
    (let [components (show)]
      (update-groups)
      (activate-groups-table components)
      components)))
