SWT applets ... not the best choice?

E

EdwardH

I've got a project lined up for next year. Some kind of "look through a
presentation and then answer a few questions"-jobbie that will be an applet.

Anyways, I've been looking at SWT and don't completely dislike the way
it works, unfortunately one doesn't seem able to use SWT in an applet
because of the dll's it requires.

I am NOT allowed to ask the users of the applet to jump through hoops to
get it working. Download java 1.5, yes. Download extra DLLs and hope to
god they get put in the proper place, no.

So... what are my options? Swing and then hope that SWT gets included in
the next java?
 
B

Benji

EdwardH said:
So... what are my options? Swing and then hope that SWT gets included in
the next java?

I don't think that's a very likely possibility. I really doubt sun will
include SWT at any point. I does all of the things that swing does, but
in a non-portable way; which is completely unacceptable as far as the java
paradigm goes. If anything, they would write native implementations for
the swing engine on selected OSes...

I wouldn't use SWT unless you have a really really good reason to use it.
As of 1.5, swing is fairly fast anyway...and looking forward, computers are
only going to get faster, and make the only difference that SWT looks much
uglier. =)
 
T

Tim Tyler

Benji said:
EdwardH, while high on whiteboard markers, wrote:

I don't think that's a very likely possibility. I really doubt sun will
include SWT at any point. I does all of the things that swing does, but
in a non-portable way; which is completely unacceptable as far as the java
paradigm goes.

"Non-portable" - but it runs on:

Windows
Windows CE (ARM PocketPC)
Windows CE (ARM PocketPC, J2ME profile)
Linux (x86/GTK 2)
Linux (x86_64/GTK 2)
Linux (PPC/GTK 2)
Linux (x86/Motif)
Solaris 8 (SPARC/GTK 2)
Solaris 8 (SPARC/Motif)
QNX (x86/Photon)
AIX (PPC/Motif)
HP-UX (HP9000/Motif)
Mac OSX (Mac/Carbon)

Have you tried running any Swing apps on Windows CE recently?
 
S

Steve Sobol

Benji said:
I wouldn't use SWT unless you have a really really good reason to use it.

I do. Swing's GUI performance sucks rocks, at least up until 1.5.

With SWT you lose the ability to run on any platform that Swing will run on.
OTOH, it's much faster, and you can port SWT to other platforms. Although if
you need to be able to run on all Java-compatible platforms *now*, use Swing
anyhow.
 
B

Benji

Steve said:
I do. Swing's GUI performance sucks rocks, at least up until 1.5.

Well, I think 1.5 made a big step forward in the performance of swing.
Of course, each release except 1.4 has really done that, but 1.5 really
brought it close to that of a native application. Netbeans runs just as
fast for me as visual studio on my laptop, and I no longer have the
frustrating delayed feeling that I did when using swing GUIs.

But I guess maybe on lower powered (or lower memory especially) machines,
the difference might be more noticeable.
 
S

Steve Sobol

Benji said:
But I guess maybe on lower powered (or lower memory especially) machines,
the difference might be more noticeable.

Lower-memory, most definitely.
 
A

Andrew Thompson

EdwardH said:
I've got a project lined up for next year. Some kind of "look through a
presentation and then answer a few questions"-jobbie that will be an
applet.

How's your sanity? Got plenty to spare?
You'll need it, working with applets..
Anyways, I've been looking at SWT and don't completely dislike the way
it works, unfortunately one doesn't seem able to use SWT in an applet
because of the dll's it requires.

Webstart/JWS can make DLL's available to applets, but..
why not make it a web launchable JWS application instead?
I am NOT allowed to ask the users of the applet to jump through hoops to
get it working. Download java 1.5, yes. Download extra DLLs and hope to
god they get put in the proper place, no.

How about
'click a button OK the upgrade to Java 1.5', followed by
'click OK to accept the code signed by ....'.

From the user's end, that should do it.
So... what are my options? Swing and then hope that SWT gets included in
the next java?

Investigate the webstart application first (..look at JWS
applets if you like - I have an example lying around somewhere*
but they truly suck.)

* <http://www.physci.org/pc/jtest-applet.jnlp> (applet)
<http://www.physci.org/pc/jtest.jnlp> (application)

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,163
Latest member
Sasha15427
Top