Re: Can I combine GUI & Applet?
Martin Gregorie wrote:
The applet does what I and my users want in this case.
Scenario "web page with applet opens, URL parameters are
written into the page to indicate the applet should just
Sound simple enough, huh? It ain't rocket science..
34/137 - This will not work in IE 7, as users need to specifically
'click on' an applet before it becomes active. Unless you
write the script element using JS (which will fail for any
browser that has JS disable)
However, there are a few cases, mostly small applications, where it
would be nice to be able to execute the same code as a command line
utility, a stand-alone GUI application or embed it in a web page.
Why the last one? Why not a button/link in a web page
that launches the application? (Which is how JWS apps.
would let me run it as command line or GUI but be able to share it more
widely by publishing it on a web page, and sounds as if it should be
less work that building three separate applications with a lot of common
Think again. It's a lot quicker to wrap an application
in a JLNP file (and sign the jars if necessary), than to
get an applet written, tested and deployed.
What is the advantage of the applet (as you see it)?
No distribution effort needed and the sandbox to reassure those of a
Web-start has both those features.
Try this link and 'cancel' it if you see anything
that would panic your users.
I know I should also look at WebStart, though I'm not all that keen on
using something that can do major installs on other people's hardware.
A 'full permissions' web-start app. is little more
'bells and whistles' than the equivalent applet, and
a sandboxed install (like above) is no drama.
Further, is the user is prompted to 'update Java'
(which could be construed as 'bells and whistles'),
then it can be concluded that the evquivalent applet
would simply have failed in its basic form.