What is Applets? How to use the foreground of application

Source: Internet
Author: User

Definition of 1.Applet: applets are small applications written in the Java programming language, which can be contained in HTML (an application of the standard Universal Markup Language) page, in much the same way as the page contains images.

Java program can be divided into two categories, Java applets and general application, and application this kind of general program such as C + + function is similar, is a standalone executable application, like HotJava is a browser, and is developed using Java programs. The most common Java programs include applications and applets. Applications are separate programs, such as HotJava browser software written in the Java language. Applets are similar to applications, but they cannot be run alone, and applets can be run in a Java-enabled browser. Applets are primarily built into HTML pages and play a role in browsing.

2.Applet How to use:

The implementation of applet applets relies primarily on the applet classes in the Java.applet package. Unlike a typical application, an applet application must be embedded in an HTML page to be interpreted and executed, while an applet can get parameters from a Web page and interact with the Web page. An applet is a Java applet that is run by a Java-enabled web browser by using the applet's HTML file. It can also be run through the applerviewer of Java development tools. The applet program cannot be separated from the HTML file that uses it. The information about the applet in this HTML file should contain at least the following three points: 1) The bytecode file name (the compiled Java file, with a. class suffix) 2) The address of the bytecode files 3) The way the applet is displayed on the Web page. An HTML file that increases the content of an applet simply makes the page more animated, such as adding sounds, animations, and other appealing features that do not alter the HTML file's irrelevant elements. 3.Applet Operation Method: Applet program does not need the main method and construction method. After compiling, write an HTML file in the program directory that contains
<applet Code=xxxx.class height=100 width=300>
</applet>
Save As Xxxx.html
Can be opened in the browser
or run with the appletviewer provided by the JDK, using the same usage as the Javac usage
The command format is appletviewerxxxx.html 4.Applet foreground: The outlook is not good, most of the view that the applet is no longer popular, as long as Sun did not say the elimination of the applet, it is also useful. Just use a few places, you can learn to try but not recommended in-depth.

What is Applets? How to use the foreground of application

Related Article

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.