   [frame]
   (seesaw.core/dispose! frame))
 
-(defn set-on-windows-closed-handler
-  [^JFrame frame
-   handler]
-  (assert (ifn? handler))
-  (seesaw.core/listen frame :window-closed (fn [_] (handler))))
-
-; (defn set-on-explain-handler
-;   [frame handler]
-;   (assert (not= frame nil))
-;   (let [btn-explain (seesaw.core/select frame [:#explain])]
-;     (assert (not= btn-explain nil))
-;     (seesaw.core/listen btn-explain :action (fn [e] (handler)))))
-
 (defn set-on-execute-handler
   "Set Execute button handler."
   [frame handler]

  (:require [sqls.ui.dev-util :as ui-dev]
            [sqls.ui.proto :refer [UI WorksheetWindow]]
            [sqls.ui.seesaw.commander :refer [show-commander!]]
            [sqls.util :refer [str-or-nil?]])
  (:import [java.awt Container Dimension Point Rectangle Toolkit]
           [java.awt.event InputEvent KeyEvent]
           [java.io File]
           [javax.swing JFrame JPanel JScrollPane JTable JViewport JTextArea KeyStroke JComponent]

        to-remove (seesaw.core/select frame [:#results-panel :> :*])]
    (doall (map (partial seesaw.core/remove! results-panel) to-remove))))

(defn choose-save-file
  "Show save dialog, return absolute path as string."
  [frame]
  (-> (^File seesaw.chooser/choose-file frame :type :save)
      (.getAbsolutePath)))

(defn show-explain-plan!
  "Show explain plan."
  [^JFrame frame
