• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Swing and Scripting Languages

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Obviously, there are great languages which work on the JVM, like Pnuts, Groovy or Jython. Does anyone have any suggestions as to which ones would make building some GUIs easier? I struggle with the Sun samples, and it seems like lots of repetitive coding which a scripting langugage could hide from me. It would also be nice if the language was not too hard for a beginnner.
Either that, or a "beginners framework" which would help hide some of the pain.
(or, perhaps, winning a book here... 8-) )
Anyway, suggestions, pointers, etc are appreciated.
Michael
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you looked into SWT yet? I am quite impressed with the speed among other things with Eclipse. By far the best editor out there.
 
Rancher
Posts: 1449
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The SWT homepage.
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While it's true that Swing has been called the "747 cockpit" of user
interface design, It's probably a mistake to think
that learning a scripting language to do Java gui's is going to be
easier than learning Swing. For the simple stuff you need only to
learn about a few layouts and widgets.
Eclipse is an advanced IDE (but an average editor) which uses a
non-Swing gui toolkit called SWT. I think SWT is losing favor
as Swing improves. Some interesting remarks about SWT and the
latest Eclipse are at http://jroller.com/page/BillDudney/20040331

Cheers,
Glenn
[ April 27, 2004: Message edited by: Glenn Murray ]
 
Matt Fury
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Eclipse is an advanced IDE (but an average editor) which uses a
non-Swing gui toolkit called SWT


Yes, I should have called it an IDE. My mistake!
I, personally, and more concerned about the speed of the application as most end-users are. I believe Java application development will take off if we can get the response time down between Windows and the App. Here's to hoping so. I love writing Java apps!
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Matt Fury:
By far the best editor out there.


Hmm, debatable. I think IDEA is the best.

Originally posted by Matt Fury:
I, personally, and more concerned about the speed of the application as most end-users are. I believe Java application development will take off if we can get the response time down between Windows and the App. Here's to hoping so. I love writing Java apps!


It's good to know there are other people out there that like writing Java Desktop Apps. FYI - Java 1.5 has some pretty significant changes in the startup time of the VM. So apps launch quite a bit faster.
Also note that with the final release of 1.5, the Linux version of java will use OpenGL for rendering in the Graphics2D API which is what Swing uses to draw all it's widgets, so that will increase some speed as well.
One last note is that Swing apps aren't slow if you code them correctly. And SWT is just plain ugly and has been way overhyped due to the success of Eclipse.
IntelliJ IDEA runs just as good as Eclipse and it is all Swing.
[ April 27, 2004: Message edited by: Gregg Bolinger ]
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now back to are regularly scheduled program....

Originally posted by Michael Wexler:
Obviously, there are great languages which work on the JVM, like Pnuts, Groovy or Jython. Does anyone have any suggestions as to which ones would make building some GUIs easier? I struggle with the Sun samples, and it seems like lots of repetitive coding which a scripting langugage could hide from me. It would also be nice if the language was not too hard for a beginnner.
Either that, or a "beginners framework" which would help hide some of the pain.
(or, perhaps, winning a book here... 8-) )
Anyway, suggestions, pointers, etc are appreciated.
Michael


You might want to look at something like Swixml.
 
Matt Fury
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

One last note is that Swing apps aren't slow if you code them correctly. And SWT is just plain ugly and has been way overhyped due to the success of Eclipse.


This is true. Multi-threading really helps. Although I guess we could debate all day one whether Java Apps will ever rival native C/C++ apps.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Matt Fury:

This is true. Multi-threading really helps. Although I guess we could debate all day one whether Java Apps will ever rival native C/C++ apps.


It depends on the domain in which we are speaking. If I was programming for Windows and only Windows, really there is no reason to NOT use MS's development languages (VS.NET).
On the other hand, if I need it to run anywhere, then Java is really my only option. It's not a matter of comparing the 2, it's a matter choosing the best tool for the job.
 
Matt Fury
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

It depends on the domain in which we are speaking. If I was programming for Windows and only Windows, really there is no reason to NOT use MS's development languages (VS.NET).


Ya, unfortunately when we talk about GUI Applications, Windows is usually the only option. I don't know too many people that run Linux / Unix as a desktop.
Personally I don't know why MS would want to create another layer to run Desktop apps with .NET. If anything that will bring it down to the level of Java.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Matt Fury:
Personally I don't know why MS would want to create another layer to run Desktop apps with .NET. If anything that will bring it down to the level of Java.

My guess would be that they were afraid of their developer base migrating to Java for serious applications (Java was a lot easier than C++ from the get go and performance was bound to get better over the years). That would explain the creation of C#. From there, it's not such a weird decision to aim for a single platform bringing together all the "MS languages."
 
Matt Fury
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

That would explain the creation of C#. From there, it's not such a weird decision to aim for a single platform bringing together all the "MS languages."


No, I understand why they are trying to do managed layer of code but to me that's exactly what it is.. another LAYER to bog down the performance.
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Matt Fury:
I understand why they are trying to do managed layer of code but to me that's exactly what it is.. another LAYER to bog down the performance.

You can always use straight C++ with Win32 APIs and not enter the dotnetland at all...
 
Michael Wexler
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks all for your suggestions. I've done some playing around, and here are my findings:
1) SWT is about as hard as SWING, in part b/c you still have to add your buttons, give them event listeners, etc., so it isn't all that much different to code. In fact, SWT is halfway between that old AWT and the newer SWING, in that some repaints that swing takes care of you still need to deal with in AWT. But I didn't worry about that; if I can get the frame to appear, then everything else I'll just learn on the way.
2) Drawing the gui on Eclipse (or netbeans or jdeveloper) is something I've tried, but then I found that I couldn't understand the code it generated. So, I couldn't understand how to make it do the things I wanted.
3) XML things which all use a defin file (like xul) are interesting ideas also, but one still needs to understand lots of swing to make it work. I found the examples often assumed lots of undestanding of how one would code in java and translate to XML, and I'm just not good enough yet. But it was all cool stuff (Thinlets, xul, and the mentioned swixml).
These are all wonderful suggestions, and I've learned lots. Other suggestions included Groovy (which has a "swingbuilder" portion) and Judoscript http://www.judoscript.com which has a very javascript like syntax.
I guess what I really want is:
Frame("Myframe");
AddButton(Name="PressMe", Action=button1Press, color=Green);
and not have to worry about making new ones, assigning listeners, etc.
Lazy guy, I guess. Perhaps GUIs are harder than I want them to be!
Thanks again to all,
Michael
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Michael Wexler:

I guess what I really want is:
Frame("Myframe");
AddButton(Name="PressMe", Action=button1Press, color=Green);
and not have to worry about making new ones, assigning listeners, etc.
Lazy guy, I guess. Perhaps GUIs are harder than I want them to be!
Thanks again to all,
Michael


Well, if it were that easy, then everyone could do it.
 
Mo-om! You're embarassing me! Can you just read a tiny ad like a normal person?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic