Free Essay

Java Applet

In:

Submitted By aris023
Words 2297
Pages 10
Applet
Java Applets were created when the Internet was becoming popular with educational institutions, businesses and consumers. Java Applets were originally meant to be part of products from the cable company, but developers of Java Applets could not convince the cable industry to use their invention. Java Applets were created by programmers at Sun in 1995. They were James Gosig, Patrick Naughton and Mike Sheridan who called themselves the Green Team.
Java Applets share some similarities with the java programming language. Java is text and characters that is written as instructions. A programmer is the person who writes the instructions on the computer. The computer will not perform an action without getting instructions from the person who writes the instructions. The java programming language allows a programmer to use the same code on both a personal computer and a Macintosh.
The same rule applies to a Web browser. The programmer who creates web pages is called the web master. The web master uses hypertext markup language to create a webpage. In order for the webpage images to move an applet is added. An applet is a small application that is placed inside the hypertext markup language.
The most popular web browsers in the 1990s were Netscape and Mosaic. Both browsers displayed still images and text. Java applets allowed the programmer to write applications for the web. For the first time, using Java Applets, images could move. Animation allowed webpages to come alive. Java Applets could also be written to display pop-up windows, create forms, and protect passwords.
The Java Applets are placed with the hypertext markup language. Since the Java Applets are a set of instructions, in order for them to perform a function the Java Applets are read by a java virtual machine. The java virtual machine is a program that debugs or check for errors in the Java Applets. The java virtual machine is part of the Web browser. Programmers can reuse the applet code on any computer platform without changing the software instructions. Using Java Applets, programmers have more control of their web browser.
To view a Java Applet go to the Web browsers, View | Page Source pull down menu. You will notice that the hypertext begins and ends with an applet tag. For example, the tags have to be present in all Web browsers that run applets. This lets the java virtual machine know that an applet is present within the browser. To view the applet animation the end user web browser has to be enabled.
Java Applets are widely used in industry; they can run in the web browser or independently. Java applets have become part of many electronic devices. Java Applets are used in remote control devices. The applets direct the movement of the electronic devices.
In smart homes java applets are used to program light switches, preprogram the T.V., and the house alarm. Java applets are also used in smart phones like the iPhone and Blackberry. They can be used from a cell phone to keep track of daily appointments, read current stock trend, play games, or make a reservation at your favorite restaurant.
A Java applet is an applet delivered to users in the form of Java bytecode. Java applets can be part of a web page and executed by the Java Virtual Machine (JVM) in a process separate from the web browser, or run in Sun's AppletViewer, a stand-alone tool for testing applets. Java applets were introduced in the first version of the Java language in 1995, and are written in programming languages that compile to Java bytecode, usually in Java, but also in other languages such as Jython, JRuby, or Eiffel (via SmartEiffel).
Java applets run at very fast speeds comparable to, but generally slower than, other compiled languages such as C++, but until approximately 2011, it had been many times faster than JavaScript. In addition, they can use 3D hardware acceleration that is available from Java. This makes applets well suited for non-trivial, computation intensive visualizations. As browsers have gained support for hardware accelerated graphics thanks to the canvastechnology (or specifically WebGL in the case of 3D graphics), as well as just in time compiled JavaScript, the speed difference has become less noticeable.
Since Java's bytecode is cross-platform or platform independent, Java applets can be executed by browsers for many platforms, including Microsoft Windows, Unix, OS X and Linux. It is also trivial to run a Java applet as an application software with very little extra code so that it can be run directly from the integrated development environment (IDE).
Java applets are executed in a sandbox by most web browsers, preventing them from accessing local data like clipboard or file system. The code of the applet is downloaded from a web server and the browser either embeds the applet into a web page or opens a new window showing the applet's user interface.
A Java applet extends the class java.applet.Applet, or in the case of a Swing applet, javax.swing.JApplet. The class must override methods from the applet class to set up a user interface inside itself (Applet) is a descendant of Panel which is a descendant of Container. As applet inherits from container, it has largely the same user interface possibilities as an ordinary Java application, including regions with user specific visualization.
The first implementations involved downloading an applet class by class. While classes are small files, there are frequently a lot of them, so applets got a reputation as slow loading components. However, since jars were introduced, an applet is usually delivered as a single file that has a size similar to a large image file (hundreds of kilobytes to several megabytes).
The domain from where the applet executable has been downloaded is the only domain to which the usual (unsigned) applet is allowed to communicate. This domain can be different from the domain where the surrounding HTML document is hosted.
Java system libraries and runtimes are backwards compatible, allowing one to write code that runs both on current and on future versions of the Java virtual machine.
Applets are used to provide interactive features to web applications that cannot be provided by HTML alone. They can capture mouse input and also have controls likebuttons or check boxes. In response to the user action an applet can change the provided graphic content. This makes applets well suitable for demonstration, visualization and teaching. There are online applet collections for studying various subjects, from physics to heart physiology. Applets are also used to create onlinegame collections that allow players to compete against live opponents in real-time.
An applet can also be a text area only, providing, for instance, a cross platform command-line interface to some remote system. If needed, an applet can leave the dedicated area and run as a separate window. However, applets have very little control over web page content outside the applet dedicated area, so they are less useful for improving the site appearance in general (while applets like news tickers or WYSIWYG editors[15] are also known). Applets can also play media in formats that are not natively supported by the browser
HTML pages may embed parameters that are passed to the applet. Hence the same applet may appear differently depending on the parameters that were passed.
As applets have been available before CSS, they were also widely used for trivial effects like navigation buttons. This use is criticized and declining.
-------------------------------------------------
Example
The following example is made simple enough to illustrate the essential use of Java applets through its java.applet package. It also uses classes from the Java Abstract Window Toolkit (AWT) for producing actual output (in this case, the "Hello, world!" message). import java.applet.Applet; import java.awt.*; // Applet code for the "Hello, world!" example. // This should be saved in a file named as "HelloWorld.java". public class HelloWorld extends Applet { // This method is mandatory, but can be empty (i.e., have no actual code). public void init() { } // This method is mandatory, but can be empty.(i.e., have no actual code). public void stop() { } // Print a message on the screen (x=20, y=10). public void paint(Graphics g) { g.drawString("Hello, world!", 20, 10); // Draws a circle on the screen (x=40, y=30). g.drawArc(40, 30, 20, 20, 0, 360); } }

Additional simple applets are available at Wikiversity.
For compiling, this code is saved in a plain-ASCII file named after the class, with the suffix .java, e.g. HelloWorld.java. The resultingHelloWorld.class applet should be placed on the web server and is invoked within an HTML page by using an <applet> or an <object> tag. For example: <!DOCTYPE html> <html> <head> <title>HelloWorld_example.html</title> </head> <body> <h1>A Java applet example</h1> <p>Here it is: <applet code="HelloWorld.class" height="40" width="200"> This is where HelloWorld.class runs. </applet></p> </body> </html>
Displaying the HelloWorld_example.html page from a Web server, the result should look as this:
A Java applet example
Here it is: Hello, world!
To minimize download time, applets are usually delivered in a form of compressed zip archive (having jar extension). If all needed classes (only one in our case) are placed in compressed archiveexample.jar, the embedding code would look different: <p>Here it is: <applet archive="example.jar" code="HelloWorld" height="40" width="200"> This is where HelloWorld.class runs. </applet></p>

-------------------------------------------------
Advantages
A Java applet can have any or all of the following advantages: * It is simple to make it work on Linux, Microsoft Windows and OS X i.e. to make it cross platform. Applets are supported by most web browsers. * The same applet can work on "all" installed versions of Java at the same time, rather than just the latest plug-in version only. However, if an applet requires a later version of the Java Runtime Environment (JRE) the client will be forced to wait during the large download. * Most web browsers cache applets so will be quick to load when returning to a web page. Applets also improve with use: after a first applet is run, the JVM is already running and starts quickly (the JVM will need to restart each time the browser starts afresh). It should be noted that JRE versions 1.5 and greater stop the JVM and restart it when the browser navigates from one HTML page containing an applet to another containing an applet. * It can move the work from the server to the client, making a web solution more scalable with the number of users/clients. * If a standalone program (like Google Earth) talks to a web server, that server normally needs to support all prior versions for users which have not kept their client software updated. In contrast, a properly configured browser loads (and caches) the latest applet version, so there is no need to support legacy versions. * The applet naturally supports the changing user state, such as figure positions on the chessboard. * Developers can develop and debug an applet direct simply by creating a main routine (either in the applet's class or in a separate class) and calling init() and start() on the applet, thus allowing for development in their favorite Java SE development environment. All one has to do after that is re-test the applet in the AppletViewer program or a web browser to ensure it conforms to security restrictions. * An untrusted applet has no access to the local machine and can only access the server it came from. This makes such an applet much safer to run than a standalone executable that it could replace. However, a signed applet can have full access to the machine it is running on if the user agrees. * Java applets are fast - and can even have similar performance to native installed software.

-------------------------------------------------
Disadvantages
A Java applet may have any of the following disadvantages: * It requires the Java plug-in. * Some browsers, notably mobile browsers running Apple iOS or Android do not run Java applets at all. * Some organizations only allow software installed by the administrators. As a result, some users can only view applets that are important enough to justify contacting the administrator to request installation of the Java plug-in. * As with any client-side scripting, security restrictions may make it difficult or even impossible for an untrusted applet to achieve the desired goals. However, simply editing the java.policy file in the JAVA JRE installation, one can grant access to the local filesystem or system clipboard for example, or to other network sources other than the network source that served the applet to the browser. * Some applets require a specific JRE. This is discouraged. * If an applet requires a newer JRE than available on the system, or a specific JRE, the user running it the first time will need to wait for the large JRE download to complete. * Java automatic installation or update may fail if a proxy server is used to access the web. This makes applets with specific requirements impossible to run unless Java is manually updated. The Java automatic updater that is part of a Java installation also may be complex to configure if it must work through a proxy. * Unlike the older applet tag, the object tag needs workarounds to write a cross-browser HTML document. * There is no standard to make the content of applets available to screen readers. Therefore, applets can harm the accessibility of a web site to users with special needs.

Similar Documents

Premium Essay

A Java Applet Paper

...A Java Applet Paper BY DuWoyn Snipe A Java applet is an applet delivered to the users in the form of Java bytecode. Java applets can run in a web browser using a Java Virtual Machine or Sun’s Applet Viewer, a stand-alone tool for testing applets. What this means is that is that it is own program language that is different than JavaScript, but we will get into that later on. Java applet is program language that is written in different types of bytecode, other than just the normal Java language, it is also written in Jython, JRuby, or Eiffel. Now the Java applet that I found is http://www.schubart.net/rc / which is a simple Rubik’s Cube Applet that allows you to play with the Rubik’s Cube. The way that it allows you to play is by at first scrambling the cube, then you gets to try and rebuild it back. Now it keeps track of how many moves that you do in order to try and figure it out. The controls for the Rubik’s Cube are very simple in the fact that the mouse is how you make the cube move. Now you can see that as you play with it the Rubik’s Cube moves very fast to the point that you almost don’t see it change. This is due to the fact that the Java applet is much faster than normal JavaScript by about 2011 times. Now this is a big deal if you are going to be running 3D graphics for the fact that they will run in real time and not slow down in order to load. Now with that last part in mind I believe that Java applet enhances a website for the fact that it allows for much...

Words: 487 - Pages: 2

Free Essay

None

...COMPUTER GRAPHICS Using Java CS 171G Outline • Terminology • Java Graphics Coordinate System • Java Applets • Drawing a Line • Changing the Color • Designing Your Own Colors • Drawing other shapes: rectangles, ovals, arcs, and polygons 1 Terminology: pixel • A pixel is the smallest visual element on a computer screen. Essentially, it’s a dot. • The image shown here is the letter S drawn in an area of 20 X 20 square pixels • The more pixels in an image, the smoother the image will appear. Terminology: resolution • Resolution: the number of pixels that can be displayed on a computer monitor. • When the resolution of a monitor is increased, pixels are smaller and closer together, so images appear smaller. • Typical computer monitor and HD television screen resolutions these days are • 720p: means 1366 pixels across by 768 pixels down • 900p: means 1600 pixels across by 900 pixels down • 1080p: means 1920 pixels across by 1080 pixels down All of the above are used in HDTVs and newer LCD displays (computer screens). 2 Resolution: Example of 900p 1600 pixels 900 pixels This screen has a total of 1,440,000 pixels Cartesian Coordinates • In math class, you learned about the Cartesian coordinate system. – Uses X (horizontal) and Y (vertical) axes – (0, 0) is at the center (also called the origin) – An increase in X means moving to the right – An increase in Y means moving up. – The Cartesian coordinate system has both positive and negative...

Words: 1930 - Pages: 8

Free Essay

Building a Virtual Exhibition: the Honan Collection Online

...Building a virtual exhibition: The Honan Collection Online James Cronin, Daniel C. Doolan and Xiaoye Dai Introduction The chapel of St. Finbarr, known as the Honan Chapel, on the grounds of University College Cork is celebrating its 90th anniversary in 2006. It was consecrated in November 1916. The chapel is central to the history of the Irish Arts & Crafts movement (1894-1925). Its furnishings and liturgical collection feature the work of many of the movement’s major artists and designers. The chapel features the earliest commission for Harry Clarke’s stained glass. This project, Honan Collection Online, aims to build upon recent scholarship by promoting awareness of the chapel and its liturgical collection. It will also illustrate how the artistic renewal of the chapel and its collection during the mid-1980s arose from the spirit of the Irish Arts & Crafts movement. The Honan Collection Online project received funding from the Quality Promotion Unit, University College Cork to develop the website. The site will feature essays linked to a comprehensive image gallery and a virtual tour of the chapel. The site will also include a discussion forum. The core project team members include: Rev. Fr. Joseph Coughlan, project director; James Cronin, History of Art, project co-ordinator; Daniel C. Doolan and Xiaoye Dai, both multimedia doctoral candidates in University College Cork, and Miguel Suarez, document scanning. Principles governing website design Websites should be designed so...

Words: 2159 - Pages: 9

Free Essay

Java Ring

...computer program. Dallas Semiconductor is developing a new Java-based, computerized ring that will automatically unlock doors and log on to computers. This mobile computer can become even more secure. You can keep the iButton with you wherever you go by wearing it as a closely guarded accessory - a watch, a key chain, a wallet, a ring - something you have spend your entire life practising how not to lose. Here are a few reasons why you might want to wear the iButton in the accessory that best fits your life style : ◆ It is a safe place to keep the private keys to conduct transactions. ◆ It overcomes the deficiencies of the secret password. ◆ You eliminate keystroke with a quick, intentional press of the Blue Dot. ◆ You keep your computer at hand versus lugging your everywhere you roam ◆ You become part of the network economy ◆ This steel-bound credential stands up to the hard knocks of everyday wear, including sessions in the swimming pool or clothes washer What is Java Ring? A Java Ring is a finger ring that contains a small microprocessor with built-in capabilities for the user, a sort of smart card that is wearable on a finger. Sun Microsystem's Java Ring was introduced at their JavaOne Conference in 1998 and, instead of a gemstone, contained an inexpensive microprocessor in a stainless-steel iButton running a Java virtual machine and preloaded with applets (little application programs). The rings were built...

Words: 7793 - Pages: 32

Free Essay

Web 238 Team Assignment

...information to share. The basic Web site is built with HTML, and then creatively enhanced with CSS. To create a visually expressive Web site that can attract thousands of visitors each day you need to use more than HTML and decide what the site contains. There are different languages that can be used to add a sense of style to your site, some of the possible devices are JavaScript, Java, DOM, and AJAX. In the following paper our team will discuss a few examples of how each can be used in Web development. Comparison of Java and JavaScript Java and JavaScript are both object-oriented languages (Burns, 2012). Knowing how to use one language often becomes confusing when attempting to learn the other. Some of the differences between the two are that Java applets can create stand-alone applications that work across platforms running as standalone programs. However, JavaScript cannot create these stand-alone applications and reside on an Internet browser. A programmer must compile Java code before the program can run. This requires an outside program just to compile the code. A compiler turns Java code into machine language code before a browser can interpret it. Any changes the programmer makes to the code will require him to recompile the program and this can be a real tedious act to commit over and over. A web designer can write JavaScript functions directly in a text editor, saving the file and upload it to the server for immediate execution or using an editor like Adobe...

Words: 2442 - Pages: 10

Premium Essay

Java

...Release Team[oR] 2001 [x] java Java 2: The Complete Reference by Patrick Naughton and Herbert Schildt Osborne/McGraw-Hill © 1999, 1108 pages ISBN: 0072119764 This thorough reference reads like a helpful friend. Includes servlets, Swing, and more. Table of Contents Back Cover Synopsis by Rebecca Rohan Java 2: The Complete Reference blends the expertise found in Java 1: The Complete Reference with Java 2 topics such as "servlets" and "Swing." As before, there's help with Java Beans and migrating from C++ to Java. A special chapter gives networking basics and breaks out networking-related classes. This book helps you master techniques by doing as well as reading. Projects include a multi-player word game with attention paid to network security. The book is updated where appropriate throughout, and the rhythm of text, code, tables, and illustrations is superb. It's a valuable resource for the developer who is elbow-deep in demanding projects. Table of Contents Java 2 Preface - 7 Part l The Java Language - The Complete Reference - 4 Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 hapter 10 - The Genesis of Java - 9 - An Overview of Java - 20 - Data Types, Variables, and Arrays - 36 - Operators - 57 - Control Statements - 75 - Introducing Classes - 94 - A Closer Look at Methods and Classes - 111 - Inheritance - 134 - Packages and Interfaces - 156 - Exception Handling - 174 Chapter 11 - Multithreaded Programming...

Words: 78285 - Pages: 314

Premium Essay

Java and Java Script

...and lastly to the Internet, one thing has been a constant, different languages evolved based on a need. For these two languages, the Internet was a perfect fit, and without them the Internet would be a less dynamic and vibrant highway. As the Internet grew, more and more people found it a more viable place to do business. With that came a need for languages that were fairly easy to learn, dynamic, secure, portable, and maintainable. The industry answered that call with languages such as Java and JavaScript. This paper will perform an analysis of both Java and JavaScript. In order for the reader to gain a better understanding of these languages, the history of these languages with overviews will be presented along with a discussion of the benefits and drawbacks. The History of Java In the middle of May 1995 Java was introduced into the world, and along with Netscape it would be the new way for Internet users to access this new information superhighway. But before it got to this point, Java technology was developed almost by accident. Back in 1991, Sun Microsystems was looking into the future in anticipation of the future of computing, and they tasked a team that became know as the “Green Project”. Their main focus was to come up with a plan for the future of computing, but what they came out with was something quite unexpected. Under the guidance of James Gosling, a team was locked away in an external site to work on the project that would define Sun’s technology direction...

Words: 1329 - Pages: 6

Premium Essay

Busines

...Java Basics Java Basics Topics in this section include: • • • • • • • • • • • What makes Java programs portable, secure, and robust The structure of Java applets and applications How Java applications are executed How applets are invoked and executed The Java Language, Part I Comments Declarations Expressions Statements Garbage collection Java Semantics Portability Java programs are portable across operating systems and hardware environments. Portability is to your advantage because: • • • You need only one version of your software to serve a broad market. The Internet, in effect, becomes one giant, dynamic library. You are no longer limited by your particular computer platform. Three features make Java String programs portable: 1. The language. The Java language is completely specified; all data-type sizes and formats are defined as part of the language. By contrast, C/C++ leaves these "details" up to the compiler implementor, and many C/C++ programs therefore © 1996-2003 jGuru.com. All Rights Reserved. Java Basics -1 Java Basics are not portable. 2. The library. The Java class library is available on any machine with a Java runtime system, because a portable program is of no use if you cannot use the same class library on every platform. Window-manager function calls in a Mac application written in C/C++, for example, do not port well to a PC. 3. The byte code. The Java runtime system does not compile your source code directly into machine language, an inflexible...

Words: 3116 - Pages: 13

Premium Essay

Java

...JMaster list of Java interview questions - 115 questions By admin | July 18, 2005 115 questions total, not for the weak. Covers everything from basics to JDBC connectivity, AWT and JSP. 1. What is the difference between procedural and object-oriented programs?- a) In procedural program, programming logic follows certain procedures and the instructions are executed one after another. In OOP program, unit of program is object, which is nothing but combination of data and code. b) In procedural program, data is exposed to the whole program whereas in OOPs program, it is accessible with in the object and which in turn assures the security of the code. 2. What are Encapsulation, Inheritance and Polymorphism?- Encapsulation is the mechanism that binds together code and data it manipulates and keeps both safe from outside interference and misuse. Inheritance is the process by which one object acquires the properties of another object. Polymorphism is the feature that allows one interface to be used for general class actions. 3. What is the difference between Assignment and Initialization?- Assignment can be done as many times as desired whereas initialization can be done only once. 4. What is OOPs?- Object oriented programming organizes a program around its data, i. e. , objects and a set of well defined interfaces to that data. An object-oriented program can be characterized as data controlling 5. access to code. What are Class, Constructor...

Words: 6762 - Pages: 28

Free Essay

Technology

...Java applets Slide 1 How applets work An applet is a special type of application that can be downloaded from an Internet or intranet server and run on the client’s computer within a web browser. The Java Plug-in is included as part of the JRE. It is a browser plug-in that allows a web browser to use a version of the JRE that’s newer than the one that’s included with the browser. For a client machine to run applets, a current version of the JRE and Java Plug-in must be installed on the client. If a user attempts to run an applet without first installing the current version of the Java Plug-in, a prompt will be displayed indicating that the Java Plug-in must be downloaded. Slide 2 Applet security issues To prevent applets from damaging a client system or from making it possible to damage a client system, security restrictions limit what an applet can do. To overcome these security restrictions, you can create a signed applet. This indicates that the applet comes from a trusted source. Then, you can add rights to the signed applet. Slide 3 What an applet can’t do Read, write, or delete files or databases on the client system. Access information about the files or databases on the client system. Run programs on the client system. Access system properties for the client system except the Java version, the name and version of the operating system, and the characters used to separate directories, paths, and lines. Make network connections to other servers available...

Words: 884 - Pages: 4

Free Essay

Types of Multimedia

...Types of Multimedia Flash, PowerPoint, XML, VRML and Java applets are all different types of multimedia that can be used for better communication. Each has its own strengths, weaknesses and suitability with respect to a hotel business. Let’s have a look at each one. Flash a multimedia platform used to add animation, video, and interactivity to web pages. A website can be built completely using flash alone. One big advantage of flash is that the software required to view flash applications comes preinstalled in most browsers. About 90 -95% of the browser market has flash preinstalled on it. Flash can compress animations into small files that can be easily downloaded by a browser with a long load time. Flash can give your site the maximum visual impact if done well. Indeed it can totally replace html in building a website. There is a downside to having a website in Flash only. The main problem is that as most of the content is video and animations, there is very little text if any for search engines to index. What this means is that with little or no keywords on your site, it will not appear in search results generated by search engines such as Yahoo and Google. This means few visitors and a low marketing impact for your hotel. A PowerPoint presentation is generated by a software program from Microsoft called PowerPoint. PowerPoint uses a graphical approach to presentations in the form of slideshows. It is widely used in businesses for presentations, briefings and trainings...

Words: 1137 - Pages: 5

Premium Essay

Ahahhaaha

...Java Compiler - A Java compiler is a compiler for the Java programming language. The most common form of output from a Java compiler is Java class files containing platform-neutral Java bytecode. There exist also compilers emitting optimized native machine code for a particular hardware/operating system combination. Most Java-to-bytecode compilers, Jikes being a well known exception, do virtually no optimization, leaving this until run time to be done by the JRE. The Java Virtual Machine (JVM) loads the class files and either interprets the bytecode or just-in-time compiles it to machine code and then possibly optimizes it using dynamic compilation. The very first Java compiler developed by Sun Microsystems was written in C using some libraries from C++. Java Interpreter - We can run Java on most platforms provided a platform must has a Java interpreter. That is why Java applications are platform independent. Java interpreter translates the Java bytecode into the code that can be understood by the Operating System. Basically, A Java interpreter is a software that implements the Java virtual machine and runs Java applications. As the Java compiler compiles the source code into the Java bytecode, the same way the Java interpreter translates the Java bytecode into the code that can be understood by the Operating System. When a Java interpreter is installed on any platform that means it is JVM (Java virtual machine) enabled platform. It (Java Interpreter) performs all of the...

Words: 1326 - Pages: 6

Free Essay

Awt vs Swing

...WT AWT vs. Swing AWT vs. Swing For this assignment, it has been requested the author write a review of the advantages and disadvantages of AWT (Abstract Window Toolkit) vs. Swing in writing a Java program. AWT is a portable GUI library for standalone applications or applets with an advantage of speed in it’s use of native peers and performance. Additionally most web browsers support AWT so the applets designed will have greater ease in use and design and AWT components look similar to the operating system in which they run on. Swing uses a set of GUI components built upon AWT technology and gives it something of a “plug and play” feel and is implemented entirely in the Java programming language. Having pure Java design, it has a greater range of behavior and not limited by the native peers that AWT uses. Additionally it has a wider range of features like icons and pop up tools. Another thought, and this is opinion, is that Sun puts more interest into swing and makes it a more robust program for it’s web based uses. The look and feel with it’s pluggable abilities lets a user design a single set of GUI applications that look similar to the native OS it is running on. Some disadvantages of AWT are the third party development and it’s smaller set of components that are available and the components typically do not support icon and tool tips. With swing, the general overall performance is slower and buggier than AWT, as this author has learned firsthand in writing with both...

Words: 287 - Pages: 2

Free Essay

Watermarking

...(compsac2000), Taipei, Taiwan, Oct. 2000. A Practical Method for Watermarking Java Programs Akito Monden Graduate School of Information Science, Nara Institute of Science and Technology akito-m@is.aist-nara.ac.jp Hajimu Iida Information Technology Center, Nara Institute of Science and Technology iida@is.aist-nara.ac.jp Ken-ichi Matsumoto Graduate School of Information Science, Nara Institute of Science and Technology matumoto@is.aist-nara.ac.jp Katsuro Inoue Graduate School of Engineering and Science, Osaka University inoue@ics.es.osaka-u.ac.jp Koji Torii Nara Institute of Science and Technology torii@is.aist-nara.ac.jp Abstract viewers[6][22]. As shown in figure 1, class viewers expose the internals of a class file, displaying class structure (fields and methods), thus, program users may know how to use that class file without asking to the original programmer. To make matters worse, program users can obtain source codes of a class file by using Java decompilers[15], such as SourceAgain[2], Jad[14], Mocha[24], etc. In this situation, the Java program developer’s intellectual property will be infringed if a program user steals anyone else’s class file and builds it into his/her own program without the original programmer's permission. We call this copyright infringement a program theft, which is one of the reasons why many companies hesitate to use Java in the real software development. Although we have copyright law to prohibit...

Words: 4625 - Pages: 19

Free Essay

Exercise Java

...Programming Exercises For Chapter 2 -------------------------------------------------------------------------------- THIS PAGE CONTAINS programming exercises based on material from Chapter 2 of this on-line Java textbook. Each exercise has a link to a discussion of one possible solution of that exercise. http://www.java2s.clanteam.com -------------------------------------------------------------------------------- Exercise 2.1: Write a program that will print your initials to standard output in letters that are nine lines tall. Each big letter should be made up of a bunch of *'s. For example, if your initials were "DJE", then the output would look something like: ****** ************* ********** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ******** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ***** **** ********** See the solution! : visit this website http://java2s.clanteam.com/ -------------------------------------------------------------------------------- Exercise 2.2: Write a program that simulates rolling a pair of dice. You can simulate rolling one die by choosing one of the integers 1, 2...

Words: 18137 - Pages: 73