seesaw

Clojure swing app startup time

元气小坏坏 提交于 2020-01-13 11:28:10
问题 I just started making a GUI app using clojure and seesaw. It does little more that create a JFrame and a couple components. Here's the code. The main function does nothing but call start-gui and exit as soon as it returns. (ns pause.gui (:use seesaw.core)) (native!) ; (javax.swing.UIManager/setLookAndFeel ; "org.pushingpixels.substance.api.skin.SubstanceGraphiteLookAndFeel") (def main-window (frame :title "Pause" :on-close :exit)) (def sidebar (listbox :model [])) (def main-area (text :multi

Listbox (JList) Won't update dynamically from custom ListModel

感情迁移 提交于 2019-12-30 11:06:05
问题 I'm working on a GUI app in Clojure using Seesaw and am having trouble getting a listbox (JList in Java) to update when my custom ListModel gets updated. Here's some of my code: (deftype ActionHistoryListModel [^{:unsynchronized-mutable true} listeners ^{:unsynchronized-mutable true} listening-to] ListModel (addListDataListener [this listener] (set! listeners (conj listeners listener))) (removeListDataListener [this listener] (set! listeners (remove #(= % listener) listeners))) (getSize [this

Why table's column names are not displayed here?

假装没事ソ 提交于 2019-12-10 14:30:00
问题 I have a problem with seesaw table. When I try to make up and show a simple table, it shows without column names. What I did: At first, I must say that I am using [seesaw "1.4.2"] . Then: ;; Clojure 1.4.0 (require '[seesaw.core :as ss]) (ss/native!) (def main-window (-> (ss/frame :title "Main window") ss/pack! (ss/config! :minimum-size [320 :by 240]) ss/show!)) (def display #(ss/config! main-window :content %)) (display (ss/table :id :dumb-table :model [:columns [:one :another] :rows [["1" "2