Types of Applets in JavaA special type of Java program that runs in a Web browser is referred to as Applet. It has less response time because it works on the client-side. It is much secured executed by the browser under any of the platforms such as Windows, Linux and Mac OS etc. There are two types of applets that a web page can contain.
Let's understand both types of Applet one by one: Local AppletLocal Applet is written on our own, and then we will embed it into web pages. Local Applet is developed locally and stored in the local system. A web page doesn't need the get the information from the internet when it finds the local Applet in the system. It is specified or defined by the file name or pathname. There are two attributes used in defining an applet, i.e., the codebase that specifies the path name and code that defined the name of the file that contains Applet's code. Specifying Local appletLet's take an example of Local applet to understand how we can create it and embedded it into web page.
FaceApplet.java Execute the above code by using the following commands: Remote AppletA remote applet is designed and developed by another developer. It is located or available on a remote computer that is connected to the internet. In order to run the applet stored in the remote computer, our system is connected to the internet then we can download run it. In order to locate and load a remote applet, we must know the applet's address on the web that is referred to as Uniform Recourse Locator(URL). Specifying Remote appletDifference Between Local Applet and Remote AppletThe following table describes the key differences between Local applet and Remote applet.
Next TopicVisitor Design Pattern Java |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India