Visual Mining contact us | site map | search

Products Solutions Resource Library Services Customers Partners Developers Company
Developers

About Java Applets

Java is a general purpose programming language developed by Sun Microsystems, which has a number of features that make it well suited for the World Wide Web. Small Java applications are called Java applets, and are generally downloaded from a Web server and run on your computer by a Java-compatible Web browser, such as Netscape Navigator or Microsoft Internet Explorer.

Uses for Java Applets

Java, as a programming language, allows the developer to create executable code that runs in the Web browser's memory space. Because Java is a complete programming language, it allows you to do almost anything you like. From within a Java program you can draw, paint bitmaps, get user events and respond to them, load URLs, etc.

If you look at the Java applets being used on the web today, you will find that a web developer uses Java for four primary tasks:

  • Creating animated graphics. This includes bitmap-loops, moving bitmaps and animated drawings. For example, the white house site has waving flags that are created using Java applets.
  • Creating graphical objects (bar charts, graphs, diagrams, etc.) that you do not want to download from the server through a CGI script.
  • Creating new application "controls." If you want to create a pushbutton control with special properties, or a more complicated control that looks like a graphics equalizer, you could create it with Java. Since you can draw and get events, you can create any kind of control you like.
  • Creating applications made up of collections of controls like edit areas, buttons, check boxes, etc. This is similar to what you can do with JavaScript, but the program is completely self-contained and compiled so that you do not reveal the source code.

Technically Speaking

Java is a complete object-oriented programming language derived from C++. It has all of the object-oriented advantages of C++, but does away with a number of the more unpleasant aspects, such as pointers and memory allocation, in the name of sanity, robustness and security. Java, as a language, also comes with a wide-ranging collection of libraries (also known as packages) that extend the language. There is a library of user interface objects called AWT, an I/O library, a network library, and so on. One can use Java to create both applets that are loaded over the web and executed inside a browser, as well as stand-alone applications.

Graphical Applets

NetCharts® Applets and NetCharts® Pro take advantage of the Java applets' abilities to create both graphics and interactivity in the Web browser without using a server to do anything more than send the applet to the browser. The advantages in this are that the applets are self-contained, and yet can communicate to outside data sources if need be, and may be interactive. The disadvantage is that all applets tend to be slow downloads to the client browser the first time they are used, which can be a frustrating experience when the user's connection is slow. A Java servlet, in contrast, is a Java applet that runs on a web server to facilitate interactivity on your web site.

Examples—Live

If you are interested in coding for Java applets, please visit our Coding Examples section on this site, where you can find coding for many applets with varying degrees of interactivity.

© 2008 Visual Mining, Inc. All rights reserved.
1-800-308-0731 | info@visualmining.com | privacy statement | legal
15825 Shady Grove Rd., Suite 20, Rockville, MD 20850 USA

Quote: Maxager Technology