目录

Desktop – Displaying a Modal Dialog Box

可以使用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"))

运行上面的代码后,您将看到以下窗口。

Hello,World!好
↑回到顶部↑
WIKI教程 @2018