# JRuby && Swing || SWT?

**URL:** <https://www.ruby-forum.com/t/jruby-swing-swt/130970>\
**Category:** Ruby\
**Created:** [March 4, 2008, 8:53pm UTC](https://www.ruby-forum.com/t/jruby-swing-swt/130970 "2008-03-04T20:53:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phillip\_G](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7ab992/32.png) [@Phillip\_G](https://www.ruby-forum.com/u/Phillip_G)\
**Post date:** [March 4, 2008, 8:53pm UTC](https://www.ruby-forum.com/t/jruby-swing-swt/130970/1 "2008-03-04T20:53:05Z")

</div>

Hello, list.

I’m looking for advice on GUI toolkits for cross-platform development /  
deployment, especially in the context of JRuby[0].

Now, that having worked with JRuby yet, I’d like to know how your  
experiences are with using JRuby in larger non-Rails projects,  
especially when developing GUI applications.

What are your experiences in that regard? How does that influence  
deployment across different operating systems (I’m mostly concerned  
about Mac OS X deployment. The currently used GUI toolkit (GTK2) is,  
from what I have gathered not trivially available on Macs, and I’d  
prefer to distribute the application I’m working on[1] in one neat  
package for everybody, especially Mac OS X end-users.

So, the long and short of it?  
Have you developed Ruby applications using JRuby with Swing[2]? With  
SWT[3]? Both?  
What’s your experience when using these toolkits?  
How easy (or painful) is deployment to the Mac?

In an ideal world, we’d distribute RSRCG as an all-in-one installer,  
with no external dependencies. How easy is that to achieve using Java?

Regards,  
Phillip

Footnotes:  
[0] [http://jruby.codehaus.org/](http://jruby.codehaus.org/)  
[1] [http://rubyforge.org/projects/rsrcg/](http://rubyforge.org/projects/rsrcg/)  
[2] [JDK 6 Swing (Java Foundation Classes (JFC))-related APIs and Developer Guides](http://java.sun.com/javase/6/docs/technotes/guides/swing/)  
[3] [SWT: The Standard Widget Toolkit | The Eclipse Foundation](http://www.eclipse.org/swt/)

---

<div class="post-metadata">

**Author:** ![Phillip\_G](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7ab992/32.png) [@Phillip\_G](https://www.ruby-forum.com/u/Phillip_G)\
**Post date:** [March 4, 2008, 9:16pm UTC](https://www.ruby-forum.com/t/jruby-swing-swt/130970/2 "2008-03-04T21:16:41Z")

</div>

I have used jruby to build a medium sized swing app. I found it very  
easy to  
write and deploy. You can wrap it up into a single jar file and wrap  
that  
in a .app file for mac os x. For everyone else, you can simply give  
them  
the executable jar.

/Shawn

On Tue, Mar 4, 2008 at 11:52 AM, Phillip G. \<

---

<div class="post-metadata">

**Author:** ![Phillip\_G](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7ab992/32.png) [@Phillip\_G](https://www.ruby-forum.com/u/Phillip_G)\
**Post date:** [March 5, 2008, 5:52am UTC](https://www.ruby-forum.com/t/jruby-swing-swt/130970/3 "2008-03-05T05:52:04Z")

</div>

Phillip G. wrote:

> Hello, list.
> 
> I’m looking for advice on GUI toolkits for cross-platform development /  
> deployment, especially in the context of JRuby[0].
> 
> Now, that having worked with JRuby yet, I’d like to know how your  
> experiences are with using JRuby in larger non-Rails projects,  
> especially when developing GUI applications.

Please take a look at Monkeybars.

[http://monkeybars.rubyforge.org/](http://monkeybars.rubyforge.org/)

While it is still under development and pre-1.0, I do not think there is  
a better library to help you build sophisticated cross-platform Swing  
apps with JRuby.

I’m working on a fairly complex desktop app now, and with Monkeybars I  
am nearly oblivious that there is Java or Swing lurking underneath.

–  
James B.

[http://www.rubyaz.org](http://www.rubyaz.org) - Hacking in the Desert  
[http://www.jamesbritt.com](http://www.jamesbritt.com) - Playing with Better Toys

---

<div class="post-metadata">

**Author:** ![Phillip\_G](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7ab992/32.png) [@Phillip\_G](https://www.ruby-forum.com/u/Phillip_G)\
**Post date:** [March 5, 2008, 8:32am UTC](https://www.ruby-forum.com/t/jruby-swing-swt/130970/4 "2008-03-05T08:32:09Z")

</div>

James B. wrote:

> Please take a look at Monkeybars.
> 
> [http://monkeybars.rubyforge.org/](http://monkeybars.rubyforge.org/)

I already found at, and I’m looking at.

> While it is still under development and pre-1.0, I do not think there  
> is a better library to help you build sophisticated cross-platform  
> Swing apps with JRuby.
> 
> I’m working on a fairly complex desktop app now, and with Monkeybars I  
> am nearly oblivious that there is Java or Swing lurking underneath.

Yeah, it looks like it will do the job.

Thanks. 🙂

- Phillip G.
