русс | укр

Языки программирования

ПаскальСиАссемблерJavaMatlabPhpHtmlJavaScriptCSSC#DelphiТурбо Пролог

Компьютерные сетиСистемное программное обеспечениеИнформационные технологииПрограммирование

Все о программировании


Linux Unix Алгоритмические языки Аналоговые и гибридные вычислительные устройства Архитектура микроконтроллеров Введение в разработку распределенных информационных систем Введение в численные методы Дискретная математика Информационное обслуживание пользователей Информация и моделирование в управлении производством Компьютерная графика Математическое и компьютерное моделирование Моделирование Нейрокомпьютеры Проектирование программ диагностики компьютерных систем и сетей Проектирование системных программ Системы счисления Теория статистики Теория оптимизации Уроки AutoCAD 3D Уроки базы данных Access Уроки Orcad Цифровые автоматы Шпаргалки по компьютеру Шпаргалки по программированию Экспертные системы Элементы теории информации

The Java (applet) Command


Дата добавления: 2015-07-09; просмотров: 515; Нарушение авторских прав


The next command that we will discuss is the command used to put a java applet on your page. Java is an object oriented programing language developed by Sun Microsystems. Java allows, theoretically, any program that can be used on a normal computer to be used over the internet. But since programs for a computer are quite large and if they were going to run over the internet they would eventually have to be downloaded, and this has not been done in great scale. However, there are a wide variety of applets that do anything from text manipulation to help you write other applets on the internet. Most of the authors of these applets let you have the source code. This will allow you to put that same applet on your page and most likely personalize it to do want you want it to do without having to learn the Java language.

In order to put a java applet on your page you must first make one, or find one on the internet. After you have done this you must enter the commands needed to run the applet on your web page. If you find an applet on the internet the author will most likely have a documentation that comes with the applet telling you how to put it on your page. I will tell you how to put a basic applet on you page. The first command that you will need to enter is an angle bracket “<“ followed by the word APPLET followed by modifiers followed by an angle bracket “>”. The modifiers that appear in the APPLET command are normally CODEBASE followed by an equal sign “=”. This modifier tells the browser what directory all the .class’s are in. The next modifier is usually CODE followed by an equal sign “=”. This modifier tells the browser which is the main .class that should be executed for this applet. WIDTH or/and HEIGHT followed by an equal sign “=” sometimes are included. This width and height works exactly like the one in the IMG SRC command. Another modifier that you can choose to include is ALIGN followed by an equal sign “=”. This lets you ALIGN the applet in the center, to the right, or to the left. Next comes a list of parameters that will be inserted run with the .class. These parameters are dependent on what the Java applet does. Parameters are recognized by an angle bracket “<“ followed by the words PARAM NAME followed by an equal sign “=” followed by the name of the command followed by the word VALUE followed by an equal sign “=” followed by where that parameter is located and ended by an angle bracket “>”. These parameters will either be given to you in the instructions on how to install the applet on your page or, if you wrote the applet, you should know them. Then the applet is ended with an angle bracket “<“ followed by a slash “/” followed by the word APPLET followed by an angle bracket “>”. The final source code for using an applet that I found on the internet called LED sign would look like this:



 

<applet codebase="/LED/Led" code="LED.class" width=500 height=48 align=center>

<param name="script" value="/LED/scripts/Demo.led">

<param name="border" value="2">

<param name="bordercolor" value="100,130,130">

<param name="spacewidth" value="3">

<param name="wth" value="122">

<param name="font" value="/LED/fonts/default.font">

<param name="ledsize" value="3">

</applet>

 

But what if the person that is visiting your page does not have a browser that supports java? What will they see? Well if you leave the applet as shown they will see nothing but you can enter an alternative that the person will see. In order to do this, after you have decide what you want the person without java to see, you go to the document source and insert the HTML code of what you want the person to see after the last parameter and before the ending applet. This is very convenient if you want to put an ad for a browser that supports java and you don’t want the people with java to have to look at/download an ad for something that they already have. The final source code for the above applet with the alternative about downloading netscape would look like this:

 

<applet codebase="/LED/Led" code="LED.class" width=500 height=48 align=center>

<param name="script" value="/LED/scripts/Demo.led">

<param name="border" value="2">

<param name="bordercolor" value="100,130,130">

<param name="spacewidth" value="3">

<param name="wth" value="122">

<param name="font" value="/LED/fonts/default.font">

<param name="ledsize" value="3">

To see this page at it’s best, download <A HREF=”http://home.netscape.com”>Netscape</A>.

</applet>



<== предыдущая лекция | следующая лекция ==>
You need a HTML 3.0 compliant browser to view this page | The Java (script) Command


Карта сайта Карта сайта укр


Уроки php mysql Программирование

Онлайн система счисления Калькулятор онлайн обычный Инженерный калькулятор онлайн Замена русских букв на английские для вебмастеров Замена русских букв на английские

Аппаратное и программное обеспечение Графика и компьютерная сфера Интегрированная геоинформационная система Интернет Компьютер Комплектующие компьютера Лекции Методы и средства измерений неэлектрических величин Обслуживание компьютерных и периферийных устройств Операционные системы Параллельное программирование Проектирование электронных средств Периферийные устройства Полезные ресурсы для программистов Программы для программистов Статьи для программистов Cтруктура и организация данных


 


Не нашли то, что искали? Google вам в помощь!

 
 

© life-prog.ru При использовании материалов прямая ссылка на сайт обязательна.

Генерация страницы за: 1.744 сек.