Saturday, 1 February 2014

APPLET FUNDAMENTALS IN JAVA

APPLET PROGRAMMING
How to Build a java applet...

An applet is a small Java program that is embedded and ran in some other Java interpreter program such as 

  •  a Java technology-enabled browser
  •  Sun’s applet viewer program called appletviewer
Applets do not use the main() method for initiating the execution of the code.Applets,when loaded,automatically call certain methods of Applet class to start and execute the applet code.
Applets cannot run any program from the local computer and they are restricted from using libraries from other languages such as C or C++.


The general form is as shown below:

import java.awt.*;
import java.applet.*;
...........................
...........................
public class appletclassname extends Applet
{
...........................
...........................
public void paint(Graphics g)
{
...........................
...........................       //Applet operations code
...........................
}
...........................
...........................
}

Example:

import javax.swing.JApplet;
import java.awt.*;
public class Applets001 extends JApplet{
public void paint(Graphics g){
super.paint(g);
g.setColor(Color.black);
g.fillOval(60, 40, 220, 220);
g.setColor(Color.red);
g.fillOval(80, 60, 180, 180);
}
}
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
<TITLE>This is my first Applet</TITLE>
</HEAD>
<BODY>
<APPLET code="Applets001.class" codebase="." width=400 height=300></APPLET>
</BODY>
</HTML>

Output:








67 comments :

  1. I agree with your thoughts!!! As the demand of java programming application keeps on increasing, there is massive demand for java professionals in software development industries. Thus, taking training will assist students to be skilled java developers in leading MNCs. J2EE Training in Chennai | JAVA Training Institutes in Chennai

    ReplyDelete
    Replies
    1. I have read your blog its very attractive and impressive. I like it your blog.

      Java Training in Chennai Core Java Training in Chennai Core Java Training in Chennai

      Java Online Training Java Online Training Core Java 8 Training in Chennai java 8 online training JavaEE Training in Chennai Java EE Training in Chennai

      Delete
    2. Java Training Institutes Java Training Institutes Java EE Training in Chennai Java EE Training in Chennai Java Spring Hibernate Training Institutes in Chennai J2EE Training Institutes in Chennai J2EE Training Institutes in Chennai Core Java Training Institutes in Chennai Core Java Training Institutes in Chennai

      Delete
  2. Thanks for sharing informative article on java application development. Your post helped to understand the career in Java.
    J2EE Training in Chennai
    .Net Training in Chennai
    PHP Training in Chennai

    ReplyDelete
  3. In near future, big data handling and processing is going to the future of IT industry. Thus taking Hadoop Training in Chennai | Big Data Training in Chennai will prove beneficial for talented professionals.

    ReplyDelete
  4. The information you have given here is truly helpful to me. CCNA- It’s a certification program based on routing & switching for starting level network engineers that helps improve your investment in knowledge of networking & increase the value of employer’s network, so if you have an wish to take training on CCNA.
    Regards,
    ccna course in Chennai|ccna training in Chennai|ccna training institute in Chennai

    ReplyDelete
  5. PHP scripting is definitely one of the easiest, if not the easiest scripting language to learn and grasp for developers. This is partially due to the similarities PHP syntax has with C and Java. Even if the only knowledge of development that you have is with HTML, picking up PHP is still fairly easy.
    PHP training in Chennai|PHP training institute in Chennai|PHP course in Chennai

    ReplyDelete
  6. Hi, actually I'am new to angularJs and infact I'am learning angularjs with online training. I'am having doubt, if you could solve the doubt for me that would be very helpful. The doubt is, how can I reset a “$timeout”, and disable a “$watch()”?
    Regards,
    angularjs training in Chennai|angularjs course in Chennai|angularjs training institute in Chennai

    ReplyDelete
  7. If you want Android Application Development in affordable price for your Business apps then contact us.....

    ReplyDelete
  8. Big data is used extensively in MNC today as using big data leads to accurate decision making and there are is a huge demand for the big data analysts.
    Big data training in Chennai | Hadoop training in Chennai | Big data training institute in Chennai

    ReplyDelete
  9. Interesting Article

    Java Training in Chennai | Online Java Training

    ReplyDelete
  10. The usage of third party storage system for the data storage can be avoided in cloud computing and we can store, access the data through internet.
    cloud computing training in chennai | cloud computing courses in chennai

    ReplyDelete
  11. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it. The python programming language is very popular and most widely used.
    Python Training in Chennai | Python Course in Chennai

    ReplyDelete
  12. Thanks for sharing this unique and informative content which provided me the required information.
    Java Training in Chennai | JAVA Course in Chennai

    ReplyDelete
  13. I would like to say that this blog really convinced me, you give me best information! Thanks, very good post.
    selenium training in chennai

    ReplyDelete
  14. Thanks for posting this useful content, Good to know about new things here, Let me share this,
    AngularJS Training in Chennai | AngularJS Training | Best AngularJS Training Institute in Chennai

    ReplyDelete
  15. reens Technology's the leading software Training & placement centre Chennai & ( Adyar)
    oracle training in chennai

    ReplyDelete
  16. looking good and useful blog

    best java j2ee training | java training center in chennai | java training institute in chennai | java j2ee training center in chennai

    ReplyDelete
  17. Thanks for sharing the information about the java and keep updating us.
    JAVA Training in Chennai

    Best JAVA Training in Chennai

    ReplyDelete
  18. Thanks for sharing these niche piece of knowledge. Here, I had a solution for my inconclusive problems & it’s really helps me a lot keep updates…
    Best JAVA Training in Chennai|JAVA Training

    ReplyDelete
  19. You will educate how to troubleshoot projects and love lessons in differed zones indicated as duds.java

    ReplyDelete
  20. Thanks for sharing much informative blog, it helps to clear my doubts. really it is very uesful for me.
    Java Training in chennai

    ReplyDelete
  21. I enjoy what you guys are usually up too. This sort of clever work and coverage! Keep up the wonderful works guys I’ve added you guys to my blog roll..,

    white label website builder

    mobile website builder

    ReplyDelete
  22. wow...nice blog, very helpful information. Thanks for sharing.

    Digital Transformation Services | Austere Technologies

    ReplyDelete
  23. Great article, really very helpful content you made. Thank you, keep sharing.

    cloud Services | Austere Technologies

    ReplyDelete
  24. Very good informative article. Thanks for sharing such nice article, keep on up dating such good articles.

    IOT SERVICES | INTERNET OF THINGS | Austere Technologies

    ReplyDelete
  25. Nice blog with excellent information. Thank you, keep sharing.

    Software Security Services | Austere Technologies

    ReplyDelete
  26. Very good informative article. Thanks for sharing such nice article, keep on up dating such good articles.

    Mobility Services | Austere Technologies

    ReplyDelete
  27. This is really great informative blog. Keep sharing.

    Best Quality Managment Services | Austere Technologies

    ReplyDelete
  28. I strongly believe that there will be great opportunities for those who looked into this area, thanks much for sharing this wonderful article here...
    Best Online Software Training Institute | Advanced Java Training

    ReplyDelete
  29. Excellent information you made in this blog, very helpful information. Thanks for sharing.

    Commerce College | Avinash college of commerce

    ReplyDelete
  30. Very good informative article. Thanks for sharing such nice article, keep on up dating such good articles.

    Best Commerce College in Hyderabad | Avinash College of Commerce

    ReplyDelete
  31. Hi Thanks for the nice information its very useful to read your blog. We provide best System Integration Services

    ReplyDelete
  32. Thank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book Andaman holiday packages

    ReplyDelete
  33. Hi Thanks for the nice information its very useful to read your blog. We provide best Finance Training in Hyderabad

    ReplyDelete
  34. Hi Thanks for the nice information its very useful to read your blog. We provide best company secretary course

    ReplyDelete
  35. Hi Thanks for the nice information its very useful to read your blog. We provide best Chartered Accountancy

    ReplyDelete
  36. Hi Thanks for the nice information its very useful to read your blog. We provide best Cost And Management Accountancy (CMA)

    ReplyDelete
  37. Hi Thanks for the nice information its very useful to read your blog. We provide best Certified Public Accountant

    ReplyDelete
  38. Hi Thanks for the nice information its very useful to read your blog. We provide best Certified Financial Analyst

    ReplyDelete
  39. Thank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book ANDAMAN TOUR PACKAGE @24599

    ReplyDelete
  40. Thank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book BEST ANDAMAN HONEYMOON PACKAGE @5999

    ReplyDelete
  41. Hi Thanks for the nice information its very useful to read your blog. We provide best Association Of Chartered Certified Accountants

    ReplyDelete
  42. Hi Thanks for the nice information its very useful to read your blog. We provide Software Development Services

    ReplyDelete
  43. Hi Thanks for the nice information its very useful to read your blog. We provide best Chartered Institute Of Management Accountants

    ReplyDelete
  44. Thank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book BEST ANDAMAN FAMILY PACKAGE @45999

    ReplyDelete
  45. Hi Thanks for the nice information its very useful to read your blog. We provide Software Development Services

    ReplyDelete
  46. Hi Thanks for the nice information its very useful to read your blog. We provide best Find All Isfs Courses

    ReplyDelete
  47. Thanks for sharing a valuable information to us. Thanks for your blog.
    CIMA training institute in Hyderabad | ISFS

    ReplyDelete
  48. We are providing online support to the customers. If you want support from the expert's to your problem, you can click on the link.
    Norton.com/setup
    Norton.com/setup
    Norton.com/setup

    ReplyDelete

  49. Upgrade to Office 365 and get the latest Office applications, installs on multiple PCs/Macs and devices, 1 TB OneDrive cloud storage per user, tech support, and other services with your subscription.

    office.com/setup
    Office.com/Setup

    ReplyDelete
  50. Help for all Microsoft Office Apps. Set up your Office 365 membership. Get help from the experts, you can tap on the link and get the best answer for your concern.
    Office.com/setup
    Office.com/setup

    ReplyDelete