Use of JNLP

5 views
Skip to first unread message

fklomp

unread,
Mar 7, 2010, 10:17:08 AM3/7/10
to gwtai
For starting an applet inside GWT, one might as well use a Composite
class (see below). For communication with the applet, native
JavaScript could do the job, referencing the provided applet id.

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML;

public class AppletContainer extends Composite {

public AppletContainer(String id, String className, String width,
String height, String jnlpHref) {
String html = "<applet id=\"" + id + "\" code=\"" +className
+ "\" width=\"" + width + "\" height=\"" + height + "\"> \n" +
" <param name=\"jnlp_href\" value=\"" + jnlpHref + "\"/>
\n" +
" </applet> ";

initWidget(new HTML(html));
}
}

Reply all
Reply to author
Forward
0 new messages