       (.setName (:name icon-hash))
       (add-handler frame (:handler icon-hash))
       (.setToolTipText (:name icon-hash)))
-    (let [icon (:icon icon-hash)]
-      (if (and icon (.exists (File. icon)))
-	(.setIcon button (ImageIcon. icon))
-	(.setIcon button (ImageIcon. *default-icon*))))
+    (let [icon (:icon icon-hash)
+	  image (-> (ImageIO/read (if (and icon (.exists (File. icon)))
+				    (File. icon)
+				    *default-icon*))
+		    (.getScaledInstance *icon-size*
+					*icon-size*
+					Image/SCALE_SMOOTH))]
+	(.setIcon button (ImageIcon. image)))
     button))
 
 (defn add-to-toolbar [frame toolbar icons]

(defn get-toolbar [frame]
  (get-component frame #(= (class %) JToolBar)))

(def *default-icon* "images/default.jpg")

(defn make-icon [frame icon-hash]
  (let [button (JButton.)]

    (add-to-menubar frame menu-bar menu-entries-from-filler)
    (.validate frame)))

; shortcuts for menu creating
(def --- {})
(def === (Box/createHorizontalGlue))

(def *main-menu* {:name "Main" :content [{:name "Add Menu" ; just for fun
					  :handler (fn [frame _]
						     (add-menus frame
								[{:name "?" :content []}]))}
					 ---
					 {:name "Quit"
					  :handler (fn [frame _] (.dispose frame))}]})

(def *help-menu* {:name "Help" :content []})

(def *standard-menus* [*main-menu* === *help-menu*])


;;; Tool Bar
