目录

Desktop – See-saw

See-saw是一个可用于创建桌面应用程序的库。 要使用See-saw,首先从以下github链接下载.clj文件https://github.com/daveray/seesaw

然后创建一个示例桌面应用程序 以下是相同的代码。

(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.core库,以便可以使用所有可用的方法。

  • 框架和内容的属性可用于定义标题以及需要在窗口中显示的内容。

  • 最后'show!' 函数用于显示窗口。

↑回到顶部↑
WIKI教程 @2018