ship schrieb:
first of all, your keyboard needs a repair, it repeats ! and ?
all the time.
What exactly do you mean with "call an applet"? If we're
talking of just starting an applet, you can create a
HTML-widget and set the HTML-tags for the applet (directly
typed in, might not work):
HTML applet = new HTML();
panel.add(applet);
applet.setHTML("<APPLET src=\"/applets/MyApplet.class\" etc.");
The browser happily interprets the HTML and should load and
start the applet. That way you should also be able to pass
arguments using the PARAM-tags.
If you want a steady communication, you have to use the Java-
to-Javascript-bridge provided by the browser, that you have
to access using JSNI.
Regards, Lothar
I know that and I assumed that the one asking is aware of that
as well. There are established solutions for this (nested
OBJECT-APPLET-tags, etc.) or you take advantage of the fact that
GWT creates one HTML-file per browser and create the fitting
HTML for every specific browser (using the replace-with-directive
in the GWT.xml-file).
Anyway. Because I don't know if I'm right what "ship" means with
"call an applet" I wasn't going into much detail about this.
Regards, Lothar
ship schrieb:
> As you wrote i had tried. But a error is occured that class can not
> found.
> I had write these lines:
> HTML applet = new HTML();
> panel.add(applet);
> applet.setHTML("<APPLET code=\"JFileChoose.class\"></applet>");
> I put my class file in classes folder of web.
> I want browse a folder so i write a applet by using JFileChooser. Now
> i want to run this applet on clicking a button. I had tried but after
> clicking on button applet is not run.
Create a HTML-page and try it out directly. Most likely the
HTML-code you used is not supported by the browser you used
for testing (as far as I know IE expects the OBJECT-tag instead
of the APPLET-tag, which is used by Mozilla-browsers).
BTW: As long as you don't have signed the applet, the JFileChooser
will not work.
Regards, Lothar