I highly recommend taking a look again at JavaFX2. The latest version
(released as part of Java 8 or as a separate jar with Java 7) has a very
unified API and is a joy to work with.

I've been hacking on a library that provides a data centric API to JavaFX2.
The cool thing is that most of it is self writing. Since the API is so
consistent, reflection can be used to discover how most of the components
work. Here's an example of what the UI description layer looks like.

https://github.com/halgari/com.tbaldridge.slide/blob/master/src/com/tbaldridge/slide.clj#L266

This library uses core.async to bind components to data. So the binding
:text<- (bindings/get-in a [:text]) will bind a control's text to whatever
is in the atom a at the path [:text]. Likewise the :text->
(bindings/assoc-in a [:text]) will keep the atom up to date with the
contents of a text box.

I haven't tested this on any platform but Mac, but I've seen tutorials of
JavaFX2 running on Linux and Windows, so I assume it's all fully cross
platform.

Timothy


On Sun, May 4, 2014 at 4:44 AM, Daniel Kersten <dkers...@gmail.com> wrote:

> I'm a massive fan of Qt and have done a lot of Qt/QML in C++ in the past,
> but lately when I've needed to do a GUI (and could use Clojure), I've been
> making it Web based and using ClojureScript with Om. Since jetty/http-kit
> run nicely as embedded servers, you could have your application run locally
> and launch a browser (rather than running it on a server) if you wanted,
> and if you have the ClojureScript talk to the Clojure "server" through
> sente, you _almost_ won't even notice its not all plain Clojure since
> communication looks more or less like a core.async channel.
>
> Might be a bit much to learn if you're new to Clojure, though.
>
> I haven't used swing or Qt in Clojure, so can't comment on them.
>
>
> On 4 May 2014 10:44, Cecil Westerhof <cldwester...@gmail.com> wrote:
>
>> 2014-05-04 10:20 GMT+02:00 Cecil Westerhof <cldwester...@gmail.com>:
>>
>>
>>>
>>>
>>> 2014-05-04 10:09 GMT+02:00 Colin Fleming <colin.mailingl...@gmail.com>:
>>>
>>> There's really no "only" way to do anything in Clojure, since you can
>>>> always drop down to Java interop. So anything that's available to Java is
>>>> available to Clojure, too. Not all the options have a nice Seesaw-like
>>>> wrapper over it of course, but they're generally still quite usable. I do a
>>>> reasonable amount of Swing work without Seesaw, mostly because it takes a
>>>> while to start up, but Seesaw has a lovely API if that's not such an issue
>>>> for you. Swing is generally a fine option, if you look at IntelliJ you'll
>>>> see it's possible to make it quite pretty and functional, although it's a
>>>> lot of work to get to that stage.
>>>>
>>>> Other options are QTJambi or SWT - I don't know anything about Pivot
>>>> and the demos didn't work for me either in Firefox or Safari but it looks
>>>> like that might be an option too. JavaFX may also be an option, although I
>>>> don't know much about it. Or you can go for more esoteric options like
>>>> embedding Chromium in a native app wrapper and use ClojureScript, which is
>>>> what LightTable and other projects do.
>>>>
>>>> It really depends on your requirements, but the above are all viable
>>>> options.
>>>>
>>>
>>> ​Well, I am a newbie with GUI, so best to start with seesaw if there is
>>> no real reason not to use Swing I think then. (I do not remember why Swing
>>> was discouraged.) I have to look into the start-up time. I did not know
>>> about that.
>>>
>>> By the way: as I understood it JavaFX is only an option if you only
>>> develop for Windows.
>>>
>>
>>  ​I see that there is also clj-swing. What would are the advantages of
>> either compared to the other?
>>
>> --
>> Cecil Westerhof
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
“One of the main causes of the fall of the Roman Empire was that–lacking
zero–they had no way to indicate successful termination of their C
programs.”
(Robert Firth)

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to