Board index » jbuilder » Converting Application to applet

Converting Application to applet


2005-04-25 03:06:20 PM
jbuilder1
Hello,
I would like to convert a java application to an applet. I already know and
use Java Web Start but with this tool the application is launch as a "frame"
application. I want my application appears in a web browser like a true
applet and I don't want to change the code of my application. Is there a way
or a third party tool to do that?
Thanks.
Cédric.
 
 

Re:Converting Application to applet

Cidric LAFFONT wrote:
Quote
I would like to convert a java application to an applet. I already
know and use Java Web Start but with this tool the application is
launch as a "frame" application. I want my application appears in a
web browser like a true applet and I don't want to change the code of
my application. Is there a way or a third party tool to do that?
Thanks.
Here's one very good reason not to use applets:
Your applet is active. The user is in the middle of some complex
transaction. An e-mail arrives for the user and the e-mail contains a
hyperlink. The user clicks on the link. With IE's default settings,
that link will overwrite the applet container, shutting down your
application and causing the user to lose work.
However, if you still want to use applets, then you'll have to move the
JFrame stuff into a JApplet. JApplet is the main container type for
the the application running in a browser.
Overall, it shouldn't be too difficult. If you did everything in
JBuilder, all you should really have to do is the following:
1. Copy the members of the class (buttons, labels, etc.).
2. Copy the contents of jbInit().
3. Replace "this.getContentPane()." with "this.".
4. Copy all member functions.
There may be some minor tweaking to do after that, but that should get
you most of the way there.
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
www.datadevelopment.com/
NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
www.datadevelopment.com/papers/index.html
Please see Borland's newsgroup guidelines at
info.borland.com/newsgroups/guide.html
 

Re:Converting Application to applet

Thank you Kevin.
You are right, it's one of the good reasons not to use applets. I prefere
Java Web Start but I don't choose.
With your solution, I must change the code and I don't want to do that. My
frames must stay JFrames. This is why I was talking about a third party
tool. I am looking for something which convert a "frame application" to an
applet.
"Kevin Dean [TeamB]" < XXXX@XXXXX.COM >a écrit dans le
message de news:xn0e1f14y699lf000-kdean@www.teamb.com...
Quote
Cidric LAFFONT wrote:

>I would like to convert a java application to an applet. I already
>know and use Java Web Start but with this tool the application is
>launch as a "frame" application. I want my application appears in a
>web browser like a true applet and I don't want to change the code of
>my application. Is there a way or a third party tool to do that?
>Thanks.

Here's one very good reason not to use applets:

Your applet is active. The user is in the middle of some complex
transaction. An e-mail arrives for the user and the e-mail contains a
hyperlink. The user clicks on the link. With IE's default settings,
that link will overwrite the applet container, shutting down your
application and causing the user to lose work.

However, if you still want to use applets, then you'll have to move the
JFrame stuff into a JApplet. JApplet is the main container type for
the the application running in a browser.

Overall, it shouldn't be too difficult. If you did everything in
JBuilder, all you should really have to do is the following:

1. Copy the members of the class (buttons, labels, etc.).
2. Copy the contents of jbInit().
3. Replace "this.getContentPane()." with "this.".
4. Copy all member functions.

There may be some minor tweaking to do after that, but that should get
you most of the way there.
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
www.datadevelopment.com/

NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
www.datadevelopment.com/papers/index.html

Please see Borland's newsgroup guidelines at
info.borland.com/newsgroups/guide.html
 

{smallsort}

Re:Converting Application to applet

Cidric LAFFONT wrote:
Quote
You are right, it's one of the good reasons not to use applets. I
prefere Java Web Start but I don't choose.
With your solution, I must change the code and I don't want to do
that. My frames must stay JFrames. This is why I was talking about a
third party tool. I am looking for something which convert a "frame
application" to an applet.
If you want to keep the JFrame architecture, then create a simple
applet whose sole job is to instantiate the JFrame and then call show()
to show it.
The previous caveat applies: the moment the user navigates away from
your page, your application will close.
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
www.datadevelopment.com/
NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
www.datadevelopment.com/papers/index.html
Please see Borland's newsgroup guidelines at
info.borland.com/newsgroups/guide.html