Introduction to appletviewer

                                          appletviewer


As discussed in the previous post that what is appletviewer lets revise back again an appletviewer is a tool to view how our applet will look like by setting the size again and again we can check instantly that how it will appear.

Why the use of appletviewer..?

Every time the rule is to make an applet first extend the applet class that is inheritance and compile it a class file is produced with the byte code and and now the second step is open the notepad and write applet tag as stated in the previous post and save as .htm extension.
 In the applet tag we have to provide a class file name . Last step is go in file menu and select our html file and open in browser the output is seen.

The meaning is that whenever changes are to be made all this steps are to be performed again so becomes a tedious job to perform all this and as a plus point to the java users java provided appletviewer it is a code nothing else .

Here comes a big difference between the original steps mentioned above and in appletviewer the difference is as before we were maintaining two files one was the java file and other is the html file here we have to maintain only one file that is the java file.

Question arises how one file..?
The key is that you have to include that applet tag in the java file then again comes an  error when we compile so the key is include that in comment line that means  particular applet  tag and what is the work of appletviewer the work is it finds all the comment line and finds the aapplet tag written in the html structure.

So now no need to make two seperate file just include the applet tag in the java file first compile the java file it will be compiled as the applet tag included in it is in comment and then in the command line type 

                                  aapletviewer javafilenm //not class file name

Your output will be ready ......!!

That was all about appletviewer hope the readers might have understood from the depth what is the use of appletviewer.

Comments

Popular posts from this blog

State space search / blocks world problem by heuristic approach /TIC TAC TOE

Navigation in Vaadin.

Drag and drop items from one Grid to another