Desktop Displaying a Modal Dialog Box


A modal dialog box can be shown by using the alert method of the see-saw class. The method takes the text value, which needs to be shown in the modal dialog box.

An example on how this is used is shown in the following program.

(ns web.core
   (:require [seesaw.core :as seesaw]))
(def window (seesaw/frame
   :title "First Example"
   :content "hello world"
   :width 200
   :height 50))
(defn -main
   [& args]
   (seesaw/show! window)
   (seesaw/alert "Hello World"))

When the above code is run, you will get the following window.

Hello World OK