Clojure-desktop-changing-value-text

提供:Dev Guides
移動先:案内検索

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"))

上記のコードを実行すると、次のウィンドウが表示されます。

さようなら