Home | Login | Blog | Forum | Download | RSS Feed | Ajax | Hello-World | J2EE | BPM | EJB | FileNet | Hibernate | ORM | IBM | ILOG | Interview | FAQs |

Java | Apache | JVM | Others | BRMS | Oracle | Pega | SOA | Sun-Certification | Web-Service | websphere | XML |
 

JAVA DEVELOPER SITE - COMPLETE JAVA TUTORIALS

Power Of Java Applet Programming


Share
 
 

Useful Java Links


       


 

Introduction

 

 An applet is an piece of software code that runs under the control of a web browser, as distinct from the application which requires an interpreter.

 

Applets are commonly used to enhance the interactivity of a web page, and deliver client-side content. Applets run in their own frame, and can display graphics, accept input from GUI components, and even open network connections. Applets running under a browser often demonstrate a certain degree of instability depending on the platform under which it is run. Applets are small applications that are accesses on Internet server, transported over the net, automatically installed. Once an Applet arrives on the client , it has limited access to resources so that it can produce an arbitrary multi-media user interface and run complex computations without introducing the risk of  viruses or breaching data integrity.

 

Common use of Java Applets

 

Ø  One of the most common use Java applets is gamming like Addicting Games, Mini Clip and Pogo. For example, when we launch a chess game, it might be rendered as a Java applet. We will activate the applet by clicking within its borders, after which we can move the chess pieces around.

Ø  Java applets is used  within communication applications, such as instant messaging applications and chat rooms. In the case of chat clients, Java Applets may operate outside the realm of the HTML Web browser and stand on its own. Even then, however, the Java Applet is backed by the environment of the operating system.

Ø  Educational tools are developed by Java Applets such as  calculators (math), money management practice sheets (finance), composition and theory exercises (music), population growth demonstration charts (biology, social sciences), time management tools (life skills) and many more. Users can input data, move objects around, manipulate shapes or anything else the developer designs the Java applet to do.

Ø  Java Applets can also used in the development of spreadsheets and word processors

Ø  Java applets are small and light enough to operate in mobile browsers and applications. Due to their relatively small RAM, mobile phones and PDAs often run Java applets as stand-alone programs for use offline or online.

Hello word to Java Applet

Let us begin by compiling and running simple applet .

HelloWorldApplet.java

import java.awt.*;

import java.applet.*;

public class HelloWorldApplet extends Applet{

public void paint (Graphics g){

g.drwaString("HelloWorld!" ,20,20);

}

}

To run the applet in a web browser we need to write a few lines of HTML text. We can test our compiled applet by starting appletviewer with the Java source code file.

The following HTL runs HelloworldApplet:

<applet code="HelloWorldApplet" width=200 height=40>

   </applet>   

In general there are 3 steps to quickly iterate through the development

  1. Edit Java soucre file someApplicationApplet.java
  2. Compile our program with javac someApplicationApplet.java
  3. Execute appletviewer someApplicationApplet.java to run applet.

The <applet> tag is used to start an applet from both HTML document and from the JDK appletviewer. The appletviewer will execute each applet tag that it finds in a separate window, while we browser will allow many applets on a single page

The syntax for <applet> tag

<applet codebase = codebaseURL code = appletFile alt=alternateTextname =appletInstanceName width=pixels height=pixels align=alignment Vspace =pixels Hspace=pixels>

<param name=AttributeName value=AtrributeValue>

 [Html displayed in the absence of Java]

</applet>        




Download Latest Java/J2EE eBooks, SCJP Dumps, SCWCD Dumps, Pega Tutorial, IBM WebSphere BPM tutorials and many more


If you need any urgent assistance on introduction-to-java-applet-programming, kindly email your requirement to us at : info@javagenious.com or Contact-an-Expert. Our experts will try their best to solve your problem.

You can also subscribe to our newsletters on introduction-to-java-applet-programming, to receive updates on introduction-to-java-applet-programming,via email.Enter you email below:

Enter your email address:

Delivered by FeedBurner



Keyword Tags: introduction-to-java-applet-programming tutorial,introduction-to-java-applet-programming in java,Concepts of introduction-to-java-applet-programming,Java,J2EE,Interview Questions,introduction-to-java-applet-programming Examples


Comments:


Post Your Comment:

*

Yes, I would like to recieve email notifications on my reply.

Popular Posts:

 
Popular Downloads

SCJP 1.6 Dumps
JSP Interview Questions
Struts Interview Questions
Hibernate Interview Questions
SCWCD Dumps
SCBCD Dumps

Java/J2EE Tutorial
JMS Tutorials
seam richfaces tutorial
richfaces live demo
jquery example demo
JQuery Tutorial and Source Code
JSF Tutorial
XSL Tutorial
J2EE JMS
CORBA Applications
Java CERTIFICATION
SCJP 1.5
SCJP 1.6
SCWCD 1.5
SCBCD
Mis
Ajax autosuggest autocomplete from database
Struts forms and validation with webflow
Java Apache POI Examples
JDBC Tutorial
Oracle 9i & 10g
MYSQL Tutorial
php Tutorial
JQuery Examples
Upload Java File
JAXB Examples
PL-SQL Tutorial
Dojo AJAX
EJB Examples
Java IDE
Eclipse
NetBeans
IBM Rational Weblogic Workshop
Downloads
SCJP 1.6 Dumps
SCJP 1.5 DUMP
SCJP Material
SCWCD
Java Security
SCBCD Dumps
External Links
SUN Java
JOracle
IBM
PHP Certification
Technical Interview Questions
Amazon Interview Questions
Google Interview Questions
Microsoft Interview Questions
IBM Interview Questions
Yahoo Interview Questions
All Tutorials
php mysql tutorial
SCJP 1.5/1.6
SCWCD 1.5/1.6
Polymorphism
Thread Tutorial
Generics & Exceptions
Spring Struts Hibernate
Java Collections
MAP
SET
LIST
VECTOR
Advanced Java
Stateless Session Bean
Introduction to EJB
Stateful Session Bean
Java Design Patterns
HOME | FORUM | ABOUT | BLOGS | CONTACT-US