 (defn current-tab-title
   "Returns the currently selected tab's title and nil if there is none."
   [frame]
-  (let [^JTabbedPane tabpane (get-tabpane frame),
+  (let [tabpane (get-tabpane frame),
         index (.getSelectedIndex tabpane)]
     (if (= -1 index)
       nil

  [^JTabbedPane tabpane, component]
  ;; This contains code copied from TabComponentDemo and
  ;; ButtonTabComponent from the Java Tutorial
  (let [tabbutton (button :paint (fn [^JButton this ^Graphics g]
                                   (proxy-super paintComponent g)
                                   (let [^Graphics2D g2 (.create g),
                                         delta 6]


;;; Tabs

(defn- ^JTabbedPane get-tabpane
  "Returns tabpane of the given frame."
  [frame]
  (first (select frame [:<javax.swing.JTabbedPane>])))
