e551. Streamlined applets

Source: Internet
Author: User

Every applet must subclass Applet .

    Import java.applet.*;    Import java.awt.*;        Basicapplet extends Applet {        //This method was called once by the browser when it starts the applet.        public void init () {        }            //This method was called whenever the page containing this applet is made visible.        public void Start () {        }            //This method was called whenever the page containing this applet is not visible.        public void Stop () {        }            //This method was 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's an example of a HTML file that would cause the browser to load and start the applet:

    <applet code=basicapplet width= height= >    </applet>

related Examples

e551. Streamlined applets

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.