0% found this document useful (0 votes)
24 views24 pages

Java 4TH - Sem Unit-3

The document discusses different types of layout managers in Java including the BorderLayout, GridLayout, and FlowLayout classes which are used to organize and align components in a container. It provides examples of creating different layouts and describes methods and properties of the layout manager classes.

Uploaded by

AAHANA MANNI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views24 pages

Java 4TH - Sem Unit-3

The document discusses different types of layout managers in Java including the BorderLayout, GridLayout, and FlowLayout classes which are used to organize and align components in a container. It provides examples of creating different layouts and describes methods and properties of the layout manager classes.

Uploaded by

AAHANA MANNI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

2Dato

Page No

Awt (Abgtast windo) tonl kt

LL()AwT Conaboninta
Lse) Cong þonunt class
LLE) Layout mang Totata
LS4)
L(5) Tnsets and Dimen&l'ond

L ) Gaid Lout
L( ) Cald Loyout

L) AwT Avent L((H) Facus Avent kay


L02) Event modo L( Monst ven
Ls) stenos
) cless kistene
Lops) Adshttest
S(4) Action Cvent Meha
Poge No

TaVA A wT) Abtrat window trel ket


windowg- bazes Apbcatona in Tava
LJAYA AwT e.Cabattl blat torm
olependent Comþontn diablayel
aceardia opeaisystem
heay weight 2:e it Qormponnts
TAVAAwT AieTatchy
ttom
>Labe
chokbo Jaug1qut
chiu

aat.lompon
Conta'ne

Jqvqt window 1Pane

JerfatFrame
AU elemete Like
Cermbeheat s Uzofl0ethodd of amponttclass
uttotect Scnll bo
lalledCombentsIy
aleare! fo
AWT
each Campo
Metha!)
here
Contask neContainea Coypen
in AwT hst Contaln (3 þublle vojd Se(it oj'ells,it tee
anathe Ceombonit button
textec lebelset. vojd ~otloat CIaotMongy
Thee
4yJqv AwT
Contolne (4 btbtte vo Yisibje Cboo Jegy Stty )
To Creati Ais ple A
window Fanetda to Create
Panel
indoww Th window L Conhodned Frgmtels
+het hare
-Brde Cyeete
oje Fsam class
meny bas
PqneA Cortne los
mat have
Titeon
(Meny
3) Bclde
am Frq B t Conaine
fhat Contain tte bad
men botele
wldlety y Contn
m207tcorFor
30) ttget
Ro,te,
30) Betboud a4) Skig man vojd &tatic Publle
Butay
m"(ick
J Buton
tErtey
Ngne ButtonLabet Labelt b
Frgm
("T7") 2etTiHe
FyMeo
bje ol9ss buttog
b)ladd add
etq' to0,oy
3o) betenes
3e,
Button(ok') Buttoyb=
Nw
C
AwT Test
TestAwTeyptendy
Fr9hy Closs
T7 2mbatJavqaquat*
xanAle
No
Page
1Dete No
Pags
sset Correbcnsling
Event dick bo
ttene Cotain
et EventyCortame 76
Liomponst
gtere Comonent
istene wingow Evert Window
steneAdstmnt DAjwtt
vert
sfene Tet Event Tet
egisfenea Ketvet 4
fengA Mouye
Liste,e Action OActonvent matnshi stoteol þcte
at Ligtene Cventetesse
tenedfa asremhonolig Crent
cl
eent
Dde ttkayottmutj?
uttom. oncHek
Changg x
evet Knowssad
Liztene Avent 3
orel 2vent
Event
Comet oythre Bae
pontot saing Javx odel gtion Dela vent
4)JavqqultCaral
Laybt
1idLayout Jqvq
Laye )Jqvgqut
Flouo
pgizte
ssesthcla Creat
by Soyrce Even
mteds
thlmblemented
atall aemanage Layout 2 vokes tm
he Jab mgneA
altcula
mpoctna aon
uyed
to Cventmacndclhi
manaeag Layout atiey Dehg
Mamaod |Layout Maalel elegatoy Avat
)
No. Paga
Date No
ago
Pade No
12

QAlang t
veeg4ons Nots,South
CENTER Ernple iapartJavy gwt
Each region Cata) my Contai. elqss Baret North
Fram twEST EHTEREAST
LoinolouJ
SoUTH
Con sterend
tve
na buton
Bton b = NJ Buto"Nort)
(22 bibllc aic ne tSouth Buttor ba yw Buton( EAST)
ettoy by = w ButonwEST)

LConzbruetosg of Bande layout


Create
bargelayot bu oit

fetVisible(re
Pega Ne
)
þhlie tatic vad man (sh

HoRTH

ST
WE
Cemt EAST

CENTER
SoUTH
7Date

[27
Dote

Page No.

TR JagGadLayou class (5)


rectolanonpont 2

6
Cenpbuetoa af GdLaoic clas
3 14S

gid layout oith on colsmn ber


OCoskorat 2 22 23

(43 2/ 2)

4S6
Page o

imbart Javgqut. clqss Test


cless GuidLgyoutfest
GidLayout TestC) GraidllaytTut C)
JFYgm E.NwTFantIG
JButton b TIButtey'A Dut put
JButtom
b= w TBulty/

A
tptlaout

A
JAVA Fous Lay out ca)Flolayoul (leuLayouf LEFT)
Tk
tuje
Jaya
to
plooayoutEcloss
qokth Conponr ) Fleulayout (FloLay out cerTEA)
On after mothea
i4iaefautt fo'abble ad
banl. rample
Field ot Floolayeut clasr
CHoot(Flecaout Arean,
Qo5
LEP LE FT

TRPioLay out (Polagout


C4) publlc taie tina mt LEDi

Coni
C) Flo layout C)
Wceter aignt
a) de fef 5 Ur c9Jesi lign ant Centea
(befault)
5 Ui
loolaout FloaoutproHTJ
1123B&
o,25) LEFT, Lay
out ouFlo) Floay taqot
(n
Laob led stlaset-(
CeHTER
DErAULT J
(23)
Pege No.
25
mang
C)Ta Jayg CarLoyout clast mgne Comm ergly JaedMefhds o
Card Lasot clasR

2)Ttteatc each Component od of aAven Contane

Censhucto o cardayot clas publie void þrevious CContane oaen


i sed to Lip tobrejousCaid
3 bubic vord Ast Con fadne hannt

14 bub|je vord tCortoye baunt

6 pukia vald khow (Contonen paten


A

A
inbet Jevgiquti
e)
buklieclass Card lancutTest cnetCa)
Acten Litene pablic s tatie vaid man
CahdLascut Thetc
Caldlayoutest cd =
oJAuto("A);
CtttFVs/6 Cbru
Centatne

EJANA asvilBaglayaut
Cgtlayoucrd) to alzs
horjzon
Veteai
OY
b: edd Acten Los te nenl th) theoait
T Compontt mag nat
e
bzaddcdfey Isfen thà iaAach eaBaLasautofJen
objat
manta/ns q
bs add Aetog sden(thà)

3
Page io’ Coninud (29 Page No
24)
’Stepste betesns Event (Foy TextAea
Handng1 Lae
Upeaold Tetigtenea
dteps Cx9mble
eztArer =y Tezt re
Ligtenet Thy megn cyent Inßtaml
(Regisackio, Metneds
fo reg2 teg t Competrt oks Fx Cheek box chaies
tttete, my e
assd bnvged
hate
For omple
Exqmpe
LmbatJav
OButto(text Rield Meny Idemg Lit tmpatvggterent
cl9ss MyEvent e etends Frg (mpeyod
Synt Acte gtenad
Myevent
Tezt HeG
th add Actn ystenetu) Buton b, =yw Btfoy (OR)
M

pro cend
welCom
Yte om Bert to sfena
bre ctey iBternen (the)

Eyamþle Laite a programa betos


Nent amsllin JauCeate

imbat Jaa a t eeit*)


olass calculato etends Fran implen
Achogligiene
bublie Vojd gctin Pefeome Label delg
Achonvent e) TetFi btt
Calcustr C]
d=nw Labe CEnea Firstymba
JoE Nw Labe'Enton SeCord mymbo
lo wLabe Resal
t n TeetFrel
t3=y Teztely
bg = nw Buttoy (^Melttbyn
(33

by add Aehon gtener-(taagj

Lebl
b4iaddAcheg ustenen ( thi)

bublie void actanPhforno Acthenet


Teclfat

b-Bonols I001 220, 9,40)

b9 BtBoud (R3Ojd7910 +eetSaurel e==bt

egetSor5 ba
adoon

add( bs)
ad a bs):
)Date
(35

ftSoyreleE bg)
Ente E t nymbex
t
Pntex Selend mymbe
Result
SuM

b Dlid

The gSorci C) methad wyea dn tl


dctom Portosn medha to
Jetesmn coheo bultor cletk
bublhetatic ol man
atSourtcJ

Eventoret ctess

Battoy
DDffzet terfaelR lonsut
tfevestethede

Litene Methes
Itenfaes
Actien Petord8) Molelutened
OAhcnLastene
etrst cto vet
SMoye venL (2) moun cickadCO
fctetever
GCambon LigtenelyCombaNt fesizd 5) mouReled)
class Componnt Evenft (2)borrhemt
(3)lampongtmove DMoujeMotionstenea (UmougANMOVese
C\eomberilddm ( MotMoeg Erent 2) moux
6 Moyt wheelstenet moty tdhee rest
fMotnt twhet Eret

5)Focd LizfeneC)ocuJ Gjen DTcstene textchapdC)


) wdostisfene tr)twingo 9chmfede
cEve2)ocuJ Lestc windouevet (2) winoow Deacheb)
f 6 j e lysteneL C) 1temfato Chog
enlstert Contin dahhe Contnize
hg ComporwtLgtene
vou Stote bubllc Focallesfene
na3el)
SMglefidaktaaMouselgte Adabto MOem 4Mouk
windowEret
e) keslesjenet
wtvdowelos votd þubtie
Aidoste AdabtDindos
4tsible
Ctue)
LigteneTreet
clesre AdapteA
aoutemulU} class Adaphe
Javetrent
thyDiteneL( wndow fadd
tolCwindow
h Adba FradEw
ame Fr
hethad Uimblemnatoy
all a
C)TestAdabtex
WindowAdab
te Fra
extend AdaptTest class
5tnowtena fstaa ada Jaya
Pore class
evert,*Jauqawt imbot
AdapteCasse aya
class] Adabter Window
(4)

inou alatoe
Java Mouye Adafter Exomple
cteseot mpoltJav event qutesent
etoclog hapywinde closs Mouse Adabttest etendy
ouseAdeote
WindowAdabtotX
Mous Ades ten TetC
yw FOMouy
Adepter
ttéret Fro
ald Meuy lutener (thiu
d bimdo tohoytene
etkaot (yutt)
twtntow vee

metho6
dass mouye Adabte
bublle wald clickud Mauy Evente)
HCveatin rrephit obyet
Mowe Adobtu- X

GrsphcsEft6rshasC)

metyeetteka ooxêen)
MOuKPre &jes Gtyt vene
Mouye ntre moye Evete)
MoneEte moEerte)
boemetun aslata
ptoteTa MoeMotoy ytenet

meugÊent e)
trt
Mous Motoy y4abte
Page No.

Moue mation ahte Gzsphes


nobat Jave..qubt
mpalfJavgwtee
2CalaCalo REA)
Class Mougc matooaote fes
ehen Mocmohest1gones abi
2o) 20)
NouyMoomtabtefestU
puble Statie ojd man

taadis Moux MotieyLibtenel to


addMouemoHonisteneldhy

MDAe
talien
An Tngets obet ig re þre gen

Clas Ingets
Javq:qtInets epterad
Jqvas la Object

Ovaiabla Tncle Bolder lagyou Tnseo_TDÉ


OBottom
t i n g t bo Horg wEST CENTER

Lett SouTY Tnzt Pyt


Lekt
Botton

You might also like