e551. 精简的Applet

Posted borter

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了e551. 精简的Applet相关的知识,希望对你有一定的参考价值。

Every applet must subclass Applet.

    import java.applet.*;
    import java.awt.*;
    
    public class BasicApplet extends Applet {
        // This method is called once by the browser when it starts the applet.
        public void init() {
        }
    
        // This method is called whenever the page containing this applet is made visible.
        public void start() {
        }
    
        // This method is called whenever the page containing this applet is not visible.
        public void stop() {
        }
    
        // This method is called once when the browser destroys this applet.
        public void destroy() {
        }
    
        // This method is called whenever this applet needs to repaint itself.
        public void paint(Graphics g) {
        }
    }

Here is an example of an html file that will cause the browser to load and start the applet:

    <applet code=BasicApplet width=100 height=100>
    </applet>

 

Related Examples

以上是关于e551. 精简的Applet的主要内容,如果未能解决你的问题,请参考以下文章

e555. 在Applet中播放音频

e553. 作为浏览器访问URL

e554. 在浏览器状态栏中显示信息

CF 551 E GukiZ and GukiZiana

如何从applet增加发布请求内容限制

CodeForces 551 E GukiZ and GukiZiana