无涯教程-Clojure - Desktop – Displaying a Modal Dialog Box函数

36 阅读1分钟

可以使用See-saw类的alert方法显示模式对话框,该方法采用文本值,该文本值需要在模式对话框中显示。

(ns web.core
   (:gen-class)
   (: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"))

参考链接

www.learnfk.com/clojure/clo…