Clojure – Desktop Changing the Value of Text

Clojure desktop changing the value of text

In this guide, we will discuss Clojure Desktop Changing the value of Text. The value of the content in the window can be changed by using the ‘config!’ option. In the following example the config! option is used to change the window content to the new value of “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"))

When the above code is run, you will get the following window.

good bye

Next Topic : Click Here

This Post Has 2 Comments

Leave a Reply