   side."
   [^JFrame frame, icons]
   (do-swing
-   (let [^JToolBar toolbar (get-toolbar frame),
+   (let [^JToolBar toolbar (select frame [:JToolBar]),
          rem-icons (collapse-separators (remove (set icons) (seq (.getComponents toolbar))))]
      (.removeAll toolbar)
      (doseq [^JComponent icon rem-icons]

  [^JFrame frame, icons]
  (let [our-icons (map #(make-icon frame %) icons)]
    (do-swing
     (let [toolbar (get-toolbar frame),
           new-icons (collapse-separators (concat (.getComponents toolbar)
                                                  our-icons))]
       (.removeAll toolbar)


(defn show-in-frame
  "Creates new frame with thing embedded and shows it."
  [thing]
  (-> (frame :content thing
             :size [500 :by 200]
             :on-close :dispose)
      pack!
      show!))

(defn message-box
  "Pops up a swing message box."
