0% found this document useful (0 votes)
623 views

AdvJava BIS402 Module-3 Notes

Uploaded by

manikanta
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
623 views

AdvJava BIS402 Module-3 Notes

Uploaded by

manikanta
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

DAYANANDA SAGAR ACADEMY OF TECHNOLOGY AND MANAGEMENT

(Affiliated to VTU, Belagavi and Approved by AICTE, New Delhi)


Opp. Art of Living, Udayapura, Kanakapura Road, Bangalore- 560082

Department of Information Science and Engineering


3 Years Accredited by NBA, New Delhi

MODULE - 3

Course Name: Advanced Java


Course Code: BIS402

IV Semester
2022 Scheme

Prepared By:
Dr. Veena R S
Associate Professor,
Department of Information Science and Engineering
Email:[email protected]
fainti in Soird
let ws wte lntly into the
o atane , panel o One
dapley aea

otthen Conponr fuch es Jlabel.

Jhe dhauiny methods defind by AwT


are ohawin) daw Ret)
Painting fundamntal
Soirgs appaoach to paintiy
bwlt On the AwT-baoed mchanitm
inheit the
Pintl0 method. Bu
Uoeo a bt 8ophsha!
because Sui ee
ppaoac to painting thad invlves
olotint mettud paidlonponunt (), PaintBonden)
and punhiloen)
paotetd id pond lonprd(mglis
s the Paramt o aphics ontxt
to whih output di cwtten
Compute Zhh paintable
when daauiy to the &wtace o
Cononent, output mus be Retitd to
that inde
inde th borden
the aea thad
To obtain the bonlen ciUh
seti)
methed uoced
tset troets
detined by Cotainen f
Ovevidn by Jowponen
91 tuns ihet a s :t ,lbottom

Mthods
jdoth () obtai he widttCenyenen
-obteuns the
Cononnd

Sample output
II Paint nes to a Panel
aut t
ipont java. ;
inypond ava, aut tvent.d

tnyot java.util.*
an entends TPanl an
Ovemi oes painConfoone)to dauw Aanlom lin
clan Pard Paned eends Tpaned
trset ins

Random Aouno
faint fanell )
Set bonda/Bondufoacto ny (AeaelineBonde/
Colos. RED, s));
L
hand nuw Random()

Il Overi de the paionponet lI


protected void paindomponentapi)
Spe. paint onponend G);
2,2

icth
lo lins cohe endp ia ae
Fondon geneat d.
<I0; itt)
soa (int iz0;
Codinates
| obtan Senolon
wicth- in.e t)
x= had. nent Fnd
y= hand. tnthigd - ins.boto).
clth- ns
22 = and. nettnd

ohawline (xy, x,); // dua aLn


|/ Aemonotate ono a
faintg dnetypand.
Cla Pant Benol)
JLabel J ;

faintenmo)
ne

J Set die (30,30);


ENT.O
J- set BealiCoseOperain/TEname. CLOJE)
/ (heate ponel
painsfanll ;
jt adld (rp);

fublic statie void main (Sliny angs [3)


SuingUtiliea. insokeloa/nny kunnablkl)
nnsbe)
{ pubie void unl )
new
}3)3
3

You might also like