Professional Documents
Culture Documents
Appltsand Graphicg
Applet An gplel is mall ogplicadion d
embecdesd Oith an HTM gile hich is Proctsgd
Over he indernet
Di4ounce bthoeen
Cum b embeded
Applicaieng Connt be *Agplet
enbedod h HAML, ith H M
Connot u Libsai
AYplicatien prostuns Con*Appledg Connol
U he bsni drem sm otho CsuPngu
ang
ava iya leb Oo{ 4o 86ppor
ui n ppets
Aite ycle
An ple Contain ditenu ztaq
) Born gol
8) Kunning
delle tade
Dead tade
Aplet is
Bovn init)
LDaded
bat
pait)
onning
ede gtde
topt) dudroyt
(Dtad tdt
Borntate.
hen
Whun an
pplet i loaded en eecotien
i in bosn
Runvi n
hen un he ecutien
in SUnninng
3
epai ) = » Thi method
Pplel induy.
3
This method, i uged to tdsuue
bpddeC) =>
dr GingAeltome to
Applel", loo oo)
3
Er.htm
Body
appled Cade E . clay
hoidth = L400
htigke .A
lapplel>
lBod
E.clasy
avo C E.ay
opletviaven Ex.himl
LoppeL> 4a
ktig Pixek
AHenode -ie
hagace pizd
VspCe pi el
</applel>
Method o4 Gaphic cla
Ex
impovt va .opplek. x*
îm port
public elag ettunds Apple
Exjava
Ex. hi
import Jva.applet .
import Jva.akt. 6ulpvl
publi clasy E exterds Applel
3
3
a dvrouoec L)»hi hundii uge to dsa a
Rectangle
n an p l e
imt anglea)-
N
Ex 9-dvavsRound (Recl(loo loo, too, tto, 35 35);
)draoovalC) >"Ihis tuncie i ugdo Condruel
(onr) Cicle an plet
Xc,int ye, im
zidth jnt ysidh, .
Syras.doausbval( int
E2 .dras0val[l4oo 400 20o
200)
c , id ye,
it
langle, int 19ngle2
Syntas >9-dhaArc (id
int 2aralet,it 20angte 2).
funcdion ed to dsaus a
i
sdraoPolygenC)> Thig
Polugen n Pplet
, i t y, int length)
Syotax>9-dsasblysgn i t
5,280f;
Exint xLJ :{1o0,150, 200, 350,
350,20o3
{loo,18o, 30o, 450,
it
Hl3
.dsaoPolygen (i, y, 1 . length
kab (oqsam 08
import a Ya act.* *
public cloy E
extarda Apples
3
<html E. htm
<bodu
Code Ex.clasg
<applet
Oidth 4 0 0
heiqht4do >
slapplet
/body
</hml
Lab Psoq ram
to
whrite d java applet rigome
impert java.applel*
import a.at .*
public clasy £ e extends Applel
3
<html
<body oictth00
opplel CodeFx.clem heiqht Ro0
/opple
bdy
/htm
Aab
to ccept nd diplau
Write On apple Proram
udent
dekaile.
impovt JaYa. a p l e . * *
jva.QAGt **
im pb
.t
impbst Java.aot .tvent
Ex etends, APPaimplerneri Attien Liytehu
public cauy
i r nd
Sti name
i Ceuue
Si m
T Pield 4 49t3,t
Laloel 12,13,j4
Buten b
Publi Void init)
h ehen
LabelC£rttn Sem")
tureo TextPield CI5)
bne Butten gubmit")
add(
adl)
sdd (L);
adcta)
addfl) Java a
TDec
add (Lu) e e c u t e
Tnese
bddAcisnLietanethis) DBc
kEecte
public void paid Groyhiuy PtayHet
5.Ch
rwao tvi gh, l00, 200)
Con. Clag
sueStim nume lo6 220).
9-sausaing (aug ,l00 2uo)
9-aSring Um,100 260)
tml
<body
<applel Code er.clay htiqd-00 Adth=q00>>
s/appl
<[oely
Java Aa Bage Connettivi CTDe
TDec iy a ova APT to Conne and
execoe the oith he datubage
Sueti on ,
Im
)What Pplel 9
-
Jawa. gpld
.
impor
m p o r t
vinport v a .anot
S i n -value 0f Ca)
Stri S4r
Sering S $2,ans
public void initC)
"Edey 48 ne")-
S bpBien Pane. 3hsusdnpultDi otdgt
("erln 2 o.").
$2 Joptien Pane .Sheuo npud Dialog
"+t»ing.Valueen
too qumbe
Sum SauM);
a
ov
inmpert java.applet.*
mpost sva.aot.* *
impor java0t.evtrrt.*
Pot4
String s
Butem b', b2, b3
void initC)
Public
3
Public void ackion tajowmecl(Action EvertC ))
Ce-gebSounce C) =bl) =
SeFord Ct)
3
H(eedSbunce L)» b )
neofortAsie" Ford TTALSC 20)
Sty H«lcome Aco Apple"
Sel Fond
3
3
Public void paind C6raphit 9)