31-05-2013, 12:28 PM
Applet
Applet.docx (Size: 25.04 KB / Downloads: 23)
Introduction
Applet is java program that can be embedded into HTML pages. Java applets runs on the java enables web browsers such as mozila and internet explorer. Applet is designed to run remotely on the client browser, so there are some restrictions on it. Applet can't access system resources on the local computer. Applets are used to make the web site more dynamic and entertaining.
Advantages of Applet
• Applets are cross platform and can run on Windows, Mac OS and Linux platform
• Applets can work all the version of Java Plugin
• Applets runs in a sandbox, so the user does not need to trust the code, so it can work without security approval
• Applets are supported by most web browsers
• Applets are cached in most web browsers, so will be quick to load when returning to a web page
• User can also have full access to the machine if user allows
Disadvantages of Java Applet
• In Java plug-in is required to run applet
• Java applet requires JVM so first time it takes significant startup time
• If applet is not already cached in the machine, it will be downloaded from internet and will take time
• Its difficult to desing and build good user interface applets compared to HTML technology
Applet versus Application
Applets as previously described, are the small programs while applications are larger programs. Applets don't have the main method while in an application execution starts with the main method. Applets can run in our browser's window or in an appletviewer. To run the applet in an appletviewer will be an advantage for debugging. Applets are designed for the client site programming purpose while the applications don't have such type of criteria.
Applet are the powerful tools because it covers half of the java language picture. Java applets are the best way of creating the programs in java. There are a less number of java programmers that have the hands on experience on java applications. This is not the deficiency of java applications but the global utilization of internet. It doesn't mean that the java applications don't have the place. Both (Applets and the java applications) have the same importance at their own places. Applications are also the platform independent as well as byte oriented just like the applets.
Applets are designed just for handling the client site problems. while the java applications are designed to work with the client as well as server. Applications are designed to exists in a secure area. while the applets are typically used.
Applications and applets have much of the similarity such as both have most of the same features and share the same resources. Applets are created by extending the java.applet.Applet class while the java applications start execution from the main method. Applications are not too small to embed into a html page so that the user can view the application in your browser. On the other hand applet have the accessibility criteria of the resources. The key feature is that while they have so many differences but both can perform the same purpose.
Introduction to Java Application
Java applications have the majority of differences with the java applets. If we talk at the source code level, then we don't extend any class of the standard java library that means we are not restricted to use the already defined method or to override them for the execution n of the program. Instead we make set of classes that contains the various parts of the program and attach the main method with these classes for the execution of the code written in these classes. The following program illustrate the structure of the java application.
EXPLAINATION OF THE CODING :-
Here is a sample of running clock provided by the java applet to illustrate how to use the clock in an applet. This program shows the current time. This type of program is used to display the time on browser where your application is running on.
In this example we will see display the time in an applet in the time format like: hours, minutes and then seconds (hh:mms). Here, the ClockApplet is a class name extends from the Applet class and implements to the Runnable interface.
Applet.docx (Size: 25.04 KB / Downloads: 23)
Introduction
Applet is java program that can be embedded into HTML pages. Java applets runs on the java enables web browsers such as mozila and internet explorer. Applet is designed to run remotely on the client browser, so there are some restrictions on it. Applet can't access system resources on the local computer. Applets are used to make the web site more dynamic and entertaining.
Advantages of Applet
• Applets are cross platform and can run on Windows, Mac OS and Linux platform
• Applets can work all the version of Java Plugin
• Applets runs in a sandbox, so the user does not need to trust the code, so it can work without security approval
• Applets are supported by most web browsers
• Applets are cached in most web browsers, so will be quick to load when returning to a web page
• User can also have full access to the machine if user allows
Disadvantages of Java Applet
• In Java plug-in is required to run applet
• Java applet requires JVM so first time it takes significant startup time
• If applet is not already cached in the machine, it will be downloaded from internet and will take time
• Its difficult to desing and build good user interface applets compared to HTML technology
Applet versus Application
Applets as previously described, are the small programs while applications are larger programs. Applets don't have the main method while in an application execution starts with the main method. Applets can run in our browser's window or in an appletviewer. To run the applet in an appletviewer will be an advantage for debugging. Applets are designed for the client site programming purpose while the applications don't have such type of criteria.
Applet are the powerful tools because it covers half of the java language picture. Java applets are the best way of creating the programs in java. There are a less number of java programmers that have the hands on experience on java applications. This is not the deficiency of java applications but the global utilization of internet. It doesn't mean that the java applications don't have the place. Both (Applets and the java applications) have the same importance at their own places. Applications are also the platform independent as well as byte oriented just like the applets.
Applets are designed just for handling the client site problems. while the java applications are designed to work with the client as well as server. Applications are designed to exists in a secure area. while the applets are typically used.
Applications and applets have much of the similarity such as both have most of the same features and share the same resources. Applets are created by extending the java.applet.Applet class while the java applications start execution from the main method. Applications are not too small to embed into a html page so that the user can view the application in your browser. On the other hand applet have the accessibility criteria of the resources. The key feature is that while they have so many differences but both can perform the same purpose.
Introduction to Java Application
Java applications have the majority of differences with the java applets. If we talk at the source code level, then we don't extend any class of the standard java library that means we are not restricted to use the already defined method or to override them for the execution n of the program. Instead we make set of classes that contains the various parts of the program and attach the main method with these classes for the execution of the code written in these classes. The following program illustrate the structure of the java application.
EXPLAINATION OF THE CODING :-
Here is a sample of running clock provided by the java applet to illustrate how to use the clock in an applet. This program shows the current time. This type of program is used to display the time on browser where your application is running on.
In this example we will see display the time in an applet in the time format like: hours, minutes and then seconds (hh:mms). Here, the ClockApplet is a class name extends from the Applet class and implements to the Runnable interface.