   "Adds the additional menus to the frame in front of the first Box.Filler
   found in the menu-bar of frame."
   [frame menus]
-  (with-swing-threads
-    (let [menu-bar (get-menubar frame)
-	  menu-bar-as-seq (.getComponents menu-bar)
-	  menu-entries-before-filler (take-while #(not (instance? javax.swing.Box$Filler %))
-						 menu-bar-as-seq)
-	  menu-entries-from-filler   (drop-while #(not (instance? javax.swing.Box$Filler %))
-						 menu-bar-as-seq)]
-      (.removeAll menu-bar)
-      (add-menus-to-menubar frame menu-entries-before-filler)
-      (add-menus-to-menubar frame menus)
-      (add-menus-to-menubar frame menu-entries-from-filler)
-      (.validate frame))))
+  (do-swing
+   (let [menu-bar (get-menubar frame)
+	 menu-bar-as-seq (.getComponents menu-bar)
+	 menu-entries-before-filler (take-while #(not (instance? javax.swing.Box$Filler %))
+						menu-bar-as-seq)
+	 menu-entries-from-filler   (drop-while #(not (instance? javax.swing.Box$Filler %))
+						menu-bar-as-seq)]
+     (.removeAll menu-bar)
+     (add-menus-to-menubar frame menu-entries-before-filler)
+     (add-menus-to-menubar frame menus)
+     (add-menus-to-menubar frame menu-entries-from-filler)
+     (.validate frame))))
+
+;;
 
 (defvar --- {}
   "Separator for menu entries used in add-menus.")

(defn add-tab
  "Addes given panel to the tabpane of frame with given title, if given."
  ([frame pane title]
     (with-swing-threads
       (let [#^JTabbedPane tabpane (get-tabpane frame)]
	 (.add tabpane pane)
	 (let [index (.indexOfComponent tabpane pane)]
	   (.setTabComponentAt tabpane index (make-tab-head tabpane pane title))
	   (.setSelectedIndex tabpane index)))
       (.validate frame)))
  ([frame pane]
     (add-tab frame pane "")))


  [fn]
  (SwingUtilities/invokeAndWait fn))

(defn get-resource
  "Returns the resource res if found, nil otherwise."
  [res]
