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:








75 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. 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
  10. 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
  11. Thanks for sharing this unique and informative content which provided me the required information.
    Java Training in Chennai | JAVA Course in Chennai

    ReplyDelete
  12. 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
  13. 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
  14. reens Technology's the leading software Training & placement centre Chennai & ( Adyar)
    oracle training in chennai

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

    Best JAVA Training in Chennai

    ReplyDelete
  16. 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
  17. You will educate how to troubleshoot projects and love lessons in differed zones indicated as duds.java

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

    ReplyDelete
  19. 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
  20. Great article, really very helpful content you made. Thank you, keep sharing.

    cloud Services | Austere Technologies

    ReplyDelete
  21. 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
  22. Nice blog with excellent information. Thank you, keep sharing.

    Software Security Services | Austere Technologies

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

    Mobility Services | Austere Technologies

    ReplyDelete
  24. 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
  25. Excellent information you made in this blog, very helpful information. Thanks for sharing.

    Commerce College | Avinash college of commerce

    ReplyDelete
  26. 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
  27. Hi Thanks for the nice information its very useful to read your blog. We provide best System Integration Services

    ReplyDelete
  28. 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
  29. Hi Thanks for the nice information its very useful to read your blog. We provide best Finance Training in Hyderabad

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

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

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

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

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

    ReplyDelete
  35. 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
  36. 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
  37. Hi Thanks for the nice information its very useful to read your blog. We provide best Association Of Chartered Certified Accountants

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

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

    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 FAMILY PACKAGE @45999

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

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

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

    ReplyDelete
  44. 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

  45. 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
  46. 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
  47. An impressive share! I have just forwarded this onto a friend who had been doing a little homework on this. And he in fact ordered me dinner because I stumbled upon it for him... lol. So let me reword this.... Thank YOU for the meal!! But yeah, thanks for spending the time to talk about Jio Kbc Head Office Number Mumbai

    ReplyDelete
  48. Your style is very unique compared to other folks I've read stuff from. Many thanks for posting when you have the opportunity, blog Guess I will just book mark this site.
    IELTS Coaching in chennai

    German Classes in Chennai

    GRE Coaching Classes in Chennai

    TOEFL Coaching in Chennai

    spoken english classes in chennai | Communication training

    ReplyDelete
  49. Thanks for splitting your comprehension with us. It’s really useful to me & I hope it helps the people who in need of this vital information. otherwise anyone wants to learn advanced java so contact here- +91-9311002620 or visit website- https://www.htsindia.com/Courses/java/advanced-java-training-institute-in-delhi

    ReplyDelete
  50. www.office.com/setup - To Install Office Setup www.office.com/setup Enter Office Setup Product Key and activate, setup office product, visit Microsoft Office at office.com/setup and Get Started.


    www.office.com/setup- To get started with your Microsoft Office Installation you need valid product key code & visit www.Office.com/Setup and we can also help you with your entire process to setup office at www.office.com/setup.

    ReplyDelete
  51. www.office.com/setup– To Install Office setup Enter office setup product key and activate, setup office, visit Microsoft office at www.office.com/setup and Get Installed.



    norton.com/setup - For Downloading, Installing and activating the Norton product, visit www.norton.com/setup and Get Started with Norton Antivirus at www.norton.com/setup .



    mcafee.com/activate

    Kashmir tour packages

    ReplyDelete