Leksioni #9 Java and Java Applets: Aplikimet Multimediale
Leksioni #9 Java and Java Applets: Aplikimet Multimediale
Aplikimet multimediale
Leksioni #9 Java and Java applets
Ada GOGU
A. GOGU 1 / 26
Object oriented programming: Java Applets
Summary
2 Applets
A. GOGU 2 / 26
Object oriented programming: Java Applets
Summary
2 Applets
A. GOGU 3 / 26
Object oriented programming: Java Applets
A summary of Java
A. GOGU 5 / 26
Object oriented programming: Java Applets
A. GOGU 6 / 26
Object oriented programming: Java Applets
Portability: JVM
A. GOGU 7 / 26
Object oriented programming: Java Applets
A. GOGU 8 / 26
Object oriented programming: Java Applets
Packages:
java.lang
java.util
java.io
java.math
java.net
java.security
java.sql
java.awt
javax.swing
java.applet
A. GOGU 9 / 26
Object oriented programming: Java Applets
Classpaths:
classpath: specifies to the virtual machine the location from
which the resources (bytecode and others) should be taken.
The directory \ project \ classes
The archive \ project \ lib \ archive.jar
import : command used for importing remote packages or
classes.
A. GOGU 10 / 26
Object oriented programming: Java Applets
Summary
2 Applets
A. GOGU 11 / 26
Object oriented programming: Java Applets
Applets
A. GOGU 12 / 26
Object oriented programming: Java Applets
Applet specifics
A. GOGU 13 / 26
Object oriented programming: Java Applets
A. GOGU 14 / 26
Object oriented programming: Java Applets
Creating an applet
A. GOGU 15 / 26
Object oriented programming: Java Applets
A. GOGU 16 / 26
Object oriented programming: Java Applets
Method
Other methods
A. GOGU 18 / 26
Object oriented programming: Java Applets
Parameter passing
A. GOGU 19 / 26
Object oriented programming: Java Applets
A. GOGU 20 / 26
Object oriented programming: Java Applets
<APPLET
CODE= " AClassName "
HEIGHT= a n I n t e g e r
WIDTH= a n o t h e r I n t e g e r
>
<PARAM
NAME= " f i r s t P a r a m e t e r "
VALUE= " v a l u e O f F i r s t P a r a m e t e r "
>
<PARAM
NAME= " secondParameter "
VALUE= " valueOfSecondParameter "
>
......
</APPLET>
A. GOGU 21 / 26
Object oriented programming: Java Applets
Structure of an applet
A. GOGU 23 / 26
Object oriented programming: Java Applets
<HTML>
<body>
<applet >
<param name= " t e x t " v a l u e = " H e l l o ! ">
</ a p p l e t >
</ body>
</HTML>
A. GOGU 24 / 26
Object oriented programming: Java Applets
This file format de fichier allows the fusion of several files which
are used by an applet (".class", sounds and images) into one
file in the JAR format which will be loaded with a singe request
by the HTTP protocol.
Create : jar cfv file.jar file1... filen
call:
<applet
code = " f i l e . c l a s s "
archive=" f i l e . j a r "
w i d t h = " 200 " h e i g h t = " 200 " >
</ a p p l e t >
A. GOGU 25 / 26
Object oriented programming: Java Applets
Fund i leksionit 9
A. GOGU 26 / 26