What's Java Hybrid - Applet + Application?

后端 未结 2 693
误落风尘
误落风尘 2020-11-22 07:03

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

2条回答
  •  一生所求
    2020-11-22 07:18

    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).

提交回复
热议问题