And how can I write one?
From comments to my reply, this followed:
\"What we had in the old days - An Applet and Application - is not availab
A hybrid applet/application simply abstracts the initialization of two top-level containers, JFrame
and JApplet
. Examples are seen here, here and here.
Addendum: How does that work?
createGUI()
, and it adds the returned panel to the extant top-level container.initContainer()
method, passing the enclosing top-level container as a parameter.fireup()
method and a WindowListener
for error reporting.A Java hybrid application is one that can be run as either an application or applet. The main application class is derived from either java.awt.Applet
or javax.swing.JApplet
.
As the main
method is the entry point when running in application 'mode', it will not be called by the applet container.
The method
public void init()
is called automatically by the applet container but must be manually called from the main
method (when running as an application).