Clojure - 桌面修改文本值



可以使用 ‘config!’ 选项更改窗口中内容的值。在下例中,config! 选项用于将窗口内容更改为新值 “Good Bye”。

(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/config! window :content "Good Bye"))

运行上述代码后,将看到以下窗口。

Good Bye
clojure_applications.htm
广告
© . All rights reserved.