Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>To embed an applet into a Java application, I'd advise against using HTML. Instead, treat the <a href="http://docs.oracle.com/javase/7/docs/api/java/applet/Applet.html" rel="nofollow">applet</a> as a simple <a href="http://docs.oracle.com/javase/7/docs/api/java/awt/Component.html" rel="nofollow">component</a>, and try to behave like a browser plugin towards the applet. In particular, make sure to <a href="http://docs.oracle.com/javase/7/docs/api/java/applet/Applet.html#setStub%28java.applet.AppletStub%29" rel="nofollow">set a stub</a> and call the <a href="http://docs.oracle.com/javase/7/docs/api/java/applet/Applet.html#init%28%29" rel="nofollow"><code>init</code></a> and <a href="http://docs.oracle.com/javase/7/docs/api/java/applet/Applet.html#start%28%29" rel="nofollow"><code>start</code></a> methods appropriately. It is that <a href="http://docs.oracle.com/javase/7/docs/api/java/applet/AppletStub.html" rel="nofollow">stub</a> which <a href="http://docs.oracle.com/javase/7/docs/api/java/applet/AppletStub.html#getParameter%28java.lang.String%29" rel="nofollow">provides parameters</a> to the applet, so by implementing the <a href="http://docs.oracle.com/javase/7/docs/api/java/applet/AppletStub.html#getParameter%28java.lang.String%29" rel="nofollow"><code>getParameter</code></a> method appropriately, you can pass whatever parameters you desire.</p> <p>You might have to create a separate <a href="http://docs.oracle.com/javase/7/docs/api/java/net/URLClassLoader.html" rel="nofollow">class loader</a> for the jar of the plugin, and instantiate the plugin class through that class loader. If your environment doesn't allow your plugin the creation of new class loaders, then you should list the applet jar as a dependency of your plugin, so that its classes are available in the same class path your plugin uses. Doing so might be the easier route even if you're allowed custom class loaders, so choose whatever approach you prefer.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload