当前位置: 首页 > 文档资料 > Clojure 中文教程 >

Displaying a Modal Dialog Box

优质
小牛编辑
113浏览
2023-12-01

可以使用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!好