Tag Archives: Swing

Agents of Swing

The title of this post would make a good name for a band. Anyway, today I’m going to talk about Swing and concurrency and Clojure. The Swing framework is not thread-safe. That may sound strange at first, but there’s actually … Continue reading

Posted in Programming | Tagged , | 9 Comments

Heating Up Clojure & Swing

Most Swing examples don’t translate well into Clojure because they are so thoroughly embedded in the object-oriented paradigm. A typical Swing example has a main class that extends a container class and implements some *Listener interface.  Clojure beginners who try … Continue reading

Posted in Programming | Tagged , | 5 Comments

Taming the GridBagLayout

GUI layout is hard. You’d be crazy to do it without a GUI designer like Netbeans. Well, I’m pretty crazy. So I’m going to do some GUI layout in Clojure. And I’m going to use the most intimidating of Java’s … Continue reading

Posted in Programming | Tagged , | 7 Comments

doto Swing with Clojure

One of the great things about Clojure is how it can make Java programming easier and less verbose. Take Swing.  It takes a ton of code to render even a simple GUI.  Most tutorials don’t even tackle it without an … Continue reading

Posted in Programming | Tagged , | 5 Comments

Swing Into Actions with Clojure

My previous post left you with a Clojure/Swing GUI consisting of one window and one button.  Boring!  Let’s make it do something. To catch up, start a Clojure REPL and type: (import ‘(javax.swing JFrame JPanel JButton)) (def button (JButton. “Click … Continue reading

Posted in Programming | Tagged , | 4 Comments

First Steps With Clojure & Swing

Swing is the GUI standard for Java.  Clojure is the awesomeness standard for Java.  Let’s make an awesome GUI. Make a Window Interactive development is fun.  Fire up a Clojure REPL, and type this: (import ‘javax.swing.JFrame) (def frame (JFrame. “Hello … Continue reading

Posted in Programming | Tagged , | 4 Comments