Java Applet Hello World

Java Applet Hello World

Basically using Java Programming Language you can develop desktop like application or website like application. This example demonstrate the use of Java Applet. Java Applet can be executed only in Browser or using appletviewer. Here I have demonstrate to quick start with Java Applet Hello World. Stay Tuned Will be back with more Java Applet Programs.

 

 

Unique Functionality in Java Applets

  • Java Applet does not have main method for entry
  • It has init(), start(), stop(), paint() and destroy() method generally.
  • Most of the code is written on paint() method.
  • To run Java Applet Program you need to create html file and have to add applet tag to load applet in that region.

Steps to Run Applet Example

  • Write down Java Code and Compile it using javac command to generate class file.
  • Create HTML File with Applet tag and basic 3 attributes (code,width and height)
  • Make sure that your html file and class file should be in same location to load your class file in browser.
  • Open HTML File in any Browser that supports java runtime.

 

Your Suggestions/Comments are welcome.

Adarsh Patel

My Self Adarsh Suryakant Patel. Currently I am working as Assistant Professor at Parul Instiute of Engineering and Technology, MCA Department, Limda, Vadodara. Major Responsibility : * Lectures * Organizing Training and Expert Sessions for * Placement and Recruitment * Faculty Representative