|
Re: SWT With Applet [message #440180 is a reply to message #440179] |
Sat, 24 July 2004 20:41 |
Eclipse User |
|
|
|
Originally posted by: news.vadalus.com
I have done it and it works fine. You need to sign the applet though.
Basically just hook your eclipse code into the Applet or JApplet init
events and make sure you know how to reference the swt-win32-xxxx.dll
properly--that was the only tricky part.
L
Manohar wrote:
> Hi There,
>
> Does anybody know how to use SWT in applet. Does such a thing is EVER
> possible in SWT. There seems to be nothing on the web for it, and neither
> on the eclipse site.
>
> Thanks in advance.
>
|
|
|
|
|
Re: SWT With Applet [message #440404 is a reply to message #440370] |
Thu, 29 July 2004 16:50 |
Vadalus Messages: 24 Registered: July 2009 |
Junior Member |
|
|
OK,
You have the normal life cycle of the applet, start, stop, init,
destroy. I just have start() and stop() doing nothing... I have my
eclipse application referenced inside an applet class.
On init() I:
1. Check to make sure I have not been inited before, throw up an error
if I have
2. Check my security settings, if I am not a signed applet I should exit
3. Parse my applet parameters and pass them to the contained eclipse app
4. Get where my read/writeable temp dir is (defined in "java.io.tmpdir")
5. Check to see whether swt-win32-xxxx.dll exists in this dir.
6. If not download it from my webserver (it's part of the same webapp as
my applet)
7. Call System.load() on the location of the library
8. Finally then fire of a new thread which becomes the Eclipse Event
Dispatcher thread and init your eclipse app in there as you would normally.
9. return from the init() method.
Make sense..?
Stephane wrote:
> Could you please go into details with a basic snippet code for
> MyJApplet.java and the page.html to show us how you deal with the dll
> loading...
>
> Tnak in advance,
> Stephane
>
> vadalus wrote:
>
>
>>I have done it and it works fine. You need to sign the applet though.
>
>
>>Basically just hook your eclipse code into the Applet or JApplet init
>>events and make sure you know how to reference the swt-win32-xxxx.dll
>>properly--that was the only tricky part.
>
>
>>L
>
>
>
>>Manohar wrote:
>
>
>>>Hi There,
>>>
>>>Does anybody know how to use SWT in applet. Does such a thing is EVER
>>>possible in SWT. There seems to be nothing on the web for it, and neither
>>>on the eclipse site.
>>>
>>>Thanks in advance.
>>>
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02756 seconds