Questions tagged [seesaw]

Seesaw UI for Clojure

Seesaw is a Swing-based library/DSL for constructing user interfaces in the Clojure programming language.

63 questions
2
votes
1 answer

Menu item example in Clojure seesaw

Trying to make menus in seesaw. I can't figure out what the "items" new-action open-action etc is supposed to be in the code below inside main. I thought it could be the menu item texts, or perhaps function callbacks. Ultimately it would be nice to…
user1676605
  • 1,337
  • 3
  • 13
  • 21
2
votes
1 answer

Clojure GUI for cropping images

I'm making a GUI for selecting regions to crop from images. I have been using Seesaw and cans select rectangular regions, but cannot find a way to set an image to the background of seesaw.canvas. This suggests using icons on labels. Can I make a…
user945754
2
votes
1 answer

Translate simple Ltk-app into Clojure seesaw / swing

I am trying to decide between Clojure and CL for an upcoming project. To get my feet wet, I was toying around with some simple GUI stuff. Here is what I have in CL / Ltk: (ql:quickload "ltk") (defpackage :myed (:use :ltk :cl)) (in-package…
martin
  • 676
  • 4
  • 9
2
votes
1 answer

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

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}…
paul
  • 1,655
  • 11
  • 23
2
votes
2 answers

Clojure agents: rate limiting?

Okay, so I have this small procedural SVG editor in Clojure. It has a code pane where the user creates code that generates a SVG document, and a preview pane. The preview pane is updated whenever the code changes. Right now, on a text change event,…
Rom1
  • 3,167
  • 2
  • 22
  • 39
1
vote
2 answers

How to reuse the same window after refreshing in the REPL?

In a source file called gui.clj, I define a frame, fr, that holds the window for my application, like this: (def fr (frame ...)) and a run function that sets up fr and causes it to repaint when data changes, something like this (modeled on…
Ben Kovitz
  • 4,920
  • 1
  • 22
  • 50
1
vote
0 answers

How do you control Z-order of entities in Seesaw(clojure)?

I have a window with an xyz-panel that holds a bunch of labels. Now some of them have to overlap and I can't figure out how to set the Z-order. (defn- mk-smhi-frame "create the frame" [] (sc/window :width 1920 :height…
Kingfranz
  • 184
  • 1
  • 12
1
vote
1 answer

How do I make seesaw listbox react to double-click?

Okay, so this may be a silly one, but I am at such a loss that I created a SOF account for that. Here's a thing that does almost what I want: (let [lb (listbox :model ["a" "b" "c"])] (listen lb :selection (fn [e] (alert (selection lb)))) (->…
1
vote
1 answer

Returning information from buttons in clojure/seesaw

I have another clojure question. So I'm working on a project at the moment and attempting to write a GUI component for it. I have all the functional parts working, so now I just want it too look nice and learn a little more about how seesaw…
Lucas Rudd
  • 385
  • 1
  • 13
1
vote
1 answer

Selecting by :class or :id in seesaw

Here is from the seesaw tutorial: (def rbs (for [i [:source :doc]] (radio :id i :class :type :text (name i)))) (display (border-panel :north (horizontal-panel :items rbs) :center split :vgap 5 …
qed
  • 22,298
  • 21
  • 125
  • 196
1
vote
1 answer

wrong number of arguements clojure

I'm building a program that's meant to allow users count either the number of letters or number of words in a string, however when running the program through the cmd, I'm getting a clojure.lang.ArityException, wrong number of args (1) passed to :…
Karab
  • 23
  • 3
1
vote
1 answer

GUI Using Seesaw

I am trying to make a small window using Seesaw for Clojure. I have created a project "sample" using Leiningen. lein new app sample I have made added the dependency in the project file. (defproject sample "0.1.0-SNAPSHOT" :description "FIXME:…
abc
  • 153
  • 2
  • 12
1
vote
0 answers

Making a Dialog Box popup when button is clicked (Seesaw)

Im making a simple GUI interface where a user can add/remove a person. I have my GUI set up where there is a table of People with three fields: Name, Age, and Likes. I have a button called Add Person which I would like to have a dialog box pop up.…
JRI-src
  • 43
  • 3
1
vote
1 answer

Error on return of Clojure action in seesaw

this program opens a file read it into a list then asks the user to enter the word from the list one at a time but I get an error right after it speaks (ns EKS.Core) (use '[speech-synthesis.say :as say]) (use '[clojure.java.shell :only [sh]]) (use…
zeitue
  • 1,674
  • 2
  • 20
  • 45
1
vote
1 answer

Clojure Seesaw make menu of radio-menu items out of a list of files

I have a list of files like so ("File1" "File2" "File3") I want to turn this into a of radio-menu-items like this (menu :text "Lists" :items [(radio-menu-item :text "File 1")(radio-menu-item :text "File 2")(radio-menu-item :text "File 3")]) I have…
zeitue
  • 1,674
  • 2
  • 20
  • 45