home *** CD-ROM | disk | FTP | other *** search
/ BUG 15 / BUGCD1998_06.ISO / aplic / jbuilder / jhelp.z / borland.zip < prev    next >
PKZip Archive  |  1997-07-30  |  9.0 MB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: PKZip Archive (archive/zip).

You can browse this item here: borland.zip

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert PKZip Archive (archive/zip) magic Supported
100% dexvert JAR Archive (archive/jar) magic Supported
100% file data default
31% TrID Java Archive default
24% TrID Sweet Home 3D design (generic) default (weak)
18% TrID Mozilla Firefox browser extension default (weak)
16% TrID Mozilla Archive Format (gen) default (weak)
9% TrID ZIP compressed archive default
100% dexmagic PrintFox/Pagefox WEAK default
100% siegfried x-fmt/263 ZIP Format default
100% lsar Zip default
100% gt2 ZIP Archiv gefunden (Auflistung ist deaktiviert) default
100% detectItEasy Archive: Zip(1.0)[100.0%,1008 files] default
100% binwalkID Zip archive data, at least v1.0 to extract, compressed size: 30824, uncompressed size: 30824, name: Component/bean.html default
100% xdgMime application/zip default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 4b 03 04 0a 00 00 00 | 00 00 00 08 fe 22 fc ae |PK......|....."..|
|00000010| 2c 82 68 78 00 00 68 78 | 00 00 13 00 00 00 43 6f |,.hx..hx|......Co|
|00000020| 6d 70 6f 6e 65 6e 74 2f | 62 65 61 6e 2e 68 74 6d |mponent/|bean.htm|
|00000030| 6c 3c 48 54 4d 4c 3e 0d | 0a 3c 48 45 41 44 3e 0d |l<HTML>.|.<HEAD>.|
|00000040| 0a 3c 54 49 54 4c 45 3e | 43 57 47 3a 20 4a 61 76 |.<TITLE>|CWG: Jav|
|00000050| 61 42 65 61 6e 73 20 63 | 6f 6d 70 6f 6e 65 6e 74 |aBeans c|omponent|
|00000060| 73 3c 2f 54 49 54 4c 45 | 3e 0d 0a 3c 2f 48 45 41 |s</TITLE|>..</HEA|
|00000070| 44 3e 0d 0a 3c 42 4f 44 | 59 20 42 47 43 4f 4c 4f |D>..<BOD|Y BGCOLO|
|00000080| 52 3d 22 23 46 46 46 46 | 46 46 22 3e 0d 0a 0d 0a |R="#FFFF|FF">....|
|00000090| 3c 41 20 4e 41 4d 45 3d | 22 6a 61 76 61 62 65 61 |<A NAME=|"javabea|
|000000a0| 6e 73 63 6f 6d 70 6f 6e | 65 6e 74 73 22 3e 3c 2f |nscompon|ents"></|
|000000b0| 41 3e 0d 0a 3c 48 31 3e | 4a 61 76 61 42 65 61 6e |A>..<H1>|JavaBean|
|000000c0| 73 20 63 6f 6d 70 6f 6e | 65 6e 74 73 3c 2f 48 31 |s compon|ents</H1|
|000000d0| 3e 0d 0a 3c 21 2d 2d 42 | 4e 44 58 3d 22 4a 61 76 |>..<!--B|NDX="Jav|
|000000e0| 61 42 65 61 6e 73 3b 63 | 6f 6d 70 6f 6e 65 6e 74 |aBeans;c|omponent|
|000000f0| 73 3a 6f 76 65 72 76 69 | 65 77 22 2d 2d 3e 0d 0a |s:overvi|ew"-->..|
|00000100| 0d 0a 0d 0a 42 65 66 6f | 72 65 20 79 6f 75 20 62 |....Befo|re you b|
|00000110| 65 67 69 6e 20 63 72 65 | 61 74 69 6e 67 20 79 6f |egin cre|ating yo|
|00000120| 75 72 20 6f 77 6e 20 63 | 6f 6d 70 6f 6e 65 6e 74 |ur own c|omponent|
|00000130| 73 2c 20 79 6f 75 20 73 | 68 6f 75 6c 64 20 75 6e |s, you s|hould un|
|00000140| 64 65 72 73 74 61 6e 64 | 20 77 68 61 74 20 61 20 |derstand| what a |
|00000150| 4a 61 76 61 42 65 61 6e | 73 20 63 6f 6d 70 6f 6e |JavaBean|s compon|
|00000160| 65 6e 74 20 69 73 2e 20 | 54 68 69 73 20 63 68 61 |ent is. |This cha|
|00000170| 70 74 65 72 20 65 78 70 | 6c 61 69 6e 73 20 4a 61 |pter exp|lains Ja|
|00000180| 76 61 42 65 61 6e 73 20 | 63 6f 6d 70 6f 6e 65 6e |vaBeans |componen|
|00000190| 74 73 2c 20 69 6e 63 6c | 75 64 69 6e 67 3a 3c 70 |ts, incl|uding:<p|
|000001a0| 3e 0d 0a 3c 55 4c 3e 0d | 0a 3c 4c 49 3e 0d 0a 3c |>..<UL>.|.<LI>..<|
|000001b0| 41 20 48 52 45 46 3d 22 | 23 77 68 61 74 69 73 61 |A HREF="|#whatisa|
|000001c0| 63 6f 6d 70 6f 6e 65 6e | 74 22 3e 57 68 61 74 20 |componen|t">What |
|000001d0| 69 73 20 61 20 63 6f 6d | 70 6f 6e 65 6e 74 3f 3c |is a com|ponent?<|
|000001e0| 2f 41 3e 3c 2f 4c 49 3e | 0d 0a 0d 0a 3c 42 52 3e |/A></LI>|....<BR>|
|000001f0| 44 65 73 63 72 69 62 65 | 73 20 74 68 72 65 65 20 |Describe|s three |
|00000200| 76 69 65 77 73 20 6f 66 | 20 20 63 6f 6d 70 6f 6e |views of| compon|
|00000210| 65 6e 74 73 20 61 6e 64 | 20 74 68 65 20 64 69 66 |ents and| the dif|
|00000220| 66 65 72 65 6e 74 20 6b | 69 6e 64 73 20 6f 66 20 |ferent k|inds of |
|00000230| 63 6f 6d 70 6f 6e 65 6e | 74 73 2e 0d 0a 0d 0a 3c |componen|ts.....<|
|00000240| 50 3e 0d 0a 3c 4c 49 3e | 0d 0a 3c 41 20 48 52 45 |P>..<LI>|..<A HRE|
|00000250| 46 3d 22 23 6a 61 76 61 | 62 65 61 6e 73 72 65 71 |F="#java|beansreq|
|00000260| 75 69 72 65 6d 65 6e 74 | 73 22 3e 54 68 65 20 72 |uirement|s">The r|
|00000270| 65 71 75 69 72 65 6d 65 | 6e 74 73 20 6f 66 20 74 |equireme|nts of t|
|00000280| 68 65 20 4a 61 76 61 42 | 65 61 6e 73 20 63 6f 6d |he JavaB|eans com|
|00000290| 70 6f 6e 65 6e 74 0d 0a | 6d 6f 64 65 6c 3c 2f 41 |ponent..|model</A|
|000002a0| 3e 3c 2f 4c 49 3e 0d 0a | 0d 0a 3c 42 52 3e 44 69 |></LI>..|..<BR>Di|
|000002b0| 73 63 75 73 73 65 73 20 | 74 68 65 20 72 75 6c 65 |scusses |the rule|
|000002c0| 73 20 66 6f 72 20 63 72 | 65 61 74 69 6e 67 20 63 |s for cr|eating c|
|000002d0| 6f 6d 70 6f 6e 65 6e 74 | 73 2e 0d 0a 0d 0a 3c 50 |omponent|s.....<P|
|000002e0| 3e 0d 0a 3c 4c 49 3e 0d | 0a 3c 41 20 48 52 45 46 |>..<LI>.|.<A HREF|
|000002f0| 3d 22 23 74 68 65 70 61 | 72 74 73 6f 66 61 63 6f |="#thepa|rtsofaco|
|00000300| 6d 70 6f 6e 65 6e 74 22 | 3e 54 68 65 20 70 61 72 |mponent"|>The par|
|00000310| 74 73 20 6f 66 20 61 20 | 63 6f 6d 70 6f 6e 65 6e |ts of a |componen|
|00000320| 74 3c 2f 41 3e 3c 2f 4c | 49 3e 0d 0a 0d 0a 3c 42 |t</A></L|I>....<B|
|00000330| 52 3e 44 65 66 69 6e 65 | 73 20 63 6f 6d 70 6f 6e |R>Define|s compon|
|00000340| 65 6e 74 20 70 72 6f 70 | 65 72 74 69 65 73 2c 20 |ent prop|erties, |
|00000350| 6d 65 74 68 6f 64 73 2c | 20 61 6e 64 20 65 76 65 |methods,| and eve|
|00000360| 6e 74 73 2e 0d 0a 0d 0a | 3c 50 3e 0d 0a 3c 4c 49 |nts.....|<P>..<LI|
|00000370| 3e 0d 0a 3c 41 20 48 52 | 45 46 3d 22 23 4a 42 43 |>..<A HR|EF="#JBC|
|00000380| 4c 22 3e 49 6e 74 72 6f | 64 75 63 69 6e 67 20 74 |L">Intro|ducing t|
|00000390| 68 65 20 4a 61 76 61 42 | 65 61 6e 73 20 43 6f 6d |he JavaB|eans Com|
|000003a0| 70 6f 6e 65 6e 74 20 4c | 69 62 72 61 72 79 3c 2f |ponent L|ibrary</|
|000003b0| 41 3e 3c 2f 4c 49 3e 0d | 0a 0d 0a 3c 42 52 3e 44 |A></LI>.|...<BR>D|
|000003c0| 65 73 63 72 69 62 65 73 | 20 74 68 65 20 70 61 63 |escribes| the pac|
|000003d0| 6b 61 67 65 73 20 61 6e | 64 20 63 61 74 65 67 6f |kages an|d catego|
|000003e0| 72 69 65 73 20 6f 66 20 | 63 6f 6d 70 6f 6e 65 6e |ries of |componen|
|000003f0| 74 73 20 74 68 61 74 20 | 63 6f 6d 65 20 77 69 74 |ts that |come wit|
|00000400| 68 0d 0a 4a 42 75 69 6c | 64 65 72 2e 3c 2f 55 4c |h..JBuil|der.</UL|
|00000410| 3e 0d 0a 0d 0a 3c 48 52 | 3e 3c 21 2d 2d 2a 2a 2a |>....<HR|><!--***|
|00000420| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000430| 2a 2a 2a 2a 57 48 41 54 | 20 49 53 20 41 20 43 4f |****WHAT| IS A CO|
|00000440| 4d 50 4f 4e 45 4e 54 3f | 2a 2a 2a 2a 2a 2a 2a 2a |MPONENT?|********|
|00000450| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2d 2d |********|******--|
|00000460| 3e 0d 0a 0d 0a 3c 41 20 | 4e 41 4d 45 3d 22 77 68 |>....<A |NAME="wh|
|00000470| 61 74 69 73 61 63 6f 6d | 70 6f 6e 65 6e 74 22 3e |atisacom|ponent">|
|00000480| 3c 2f 41 3e 0d 0a 3c 48 | 32 3e 57 68 61 74 20 69 |</A>..<H|2>What i|
|00000490| 73 20 61 20 63 6f 6d 70 | 6f 6e 65 6e 74 3f 3c 2f |s a comp|onent?</|
|000004a0| 48 32 3e 0d 0a 3c 21 2d | 2d 42 4e 44 58 3d 22 63 |H2>..<!-|-BNDX="c|
|000004b0| 6f 6d 70 6f 6e 65 6e 74 | 73 3a 64 65 66 69 6e 65 |omponent|s:define|
|000004c0| 64 22 2d 2d 3e 0d 0a 0d | 0a 41 20 63 6f 6d 70 6f |d"-->...|.A compo|
|000004d0| 6e 65 6e 74 20 69 73 20 | 61 6e 20 6f 62 6a 65 63 |nent is |an objec|
|000004e0| 74 20 74 68 61 74 20 63 | 61 6e 20 62 65 20 75 73 |t that c|an be us|
|000004f0| 65 64 0d 0a 61 6e 64 20 | 74 65 73 74 65 64 20 61 |ed..and |tested a|
|00000500| 73 20 61 20 75 6e 69 74 | 2c 20 69 6e 64 65 70 65 |s a unit|, indepe|
|00000510| 6e 64 65 6e 74 20 6f 66 | 20 74 68 65 20 63 6f 6e |ndent of| the con|
|00000520| 74 65 78 74 20 69 6e 20 | 77 68 69 63 68 20 74 68 |text in |which th|
|00000530| 65 20 63 6f 6d 70 6f 6e | 65 6e 74 0d 0a 69 73 20 |e compon|ent..is |
|00000540| 65 76 65 6e 74 75 61 6c | 6c 79 20 75 73 65 64 2e |eventual|ly used.|
|00000550| 20 54 68 65 20 69 6e 74 | 65 72 6e 61 6c 20 69 6d | The int|ernal im|
|00000560| 70 6c 65 6d 65 6e 74 61 | 74 69 6f 6e 20 6f 66 20 |plementa|tion of |
|00000570| 61 20 63 6f 6d 70 6f 6e | 65 6e 74 20 69 73 20 63 |a compon|ent is c|
|00000580| 6f 6d 70 6c 65 74 65 6c | 79 0d 0a 68 69 64 64 65 |ompletel|y..hidde|
|00000590| 6e 20 66 72 6f 6d 20 74 | 68 65 20 75 73 65 72 2e |n from t|he user.|
|000005a0| 0d 0a 0d 0a 3c 50 3e 4a | 61 76 61 42 65 61 6e 73 |....<P>J|avaBeans|
|000005b0| 20 63 6f 6d 70 6f 6e 65 | 6e 74 73 20 63 6f 6d 70 | compone|nts comp|
|000005c0| 6c 79 20 77 69 74 68 20 | 74 68 65 20 4a 61 76 61 |ly with |the Java|
|000005d0| 42 65 61 6e 73 20 73 70 | 65 63 69 66 69 63 61 74 |Beans sp|ecificat|
|000005e0| 69 6f 6e 20 28 61 74 20 | 68 74 74 70 3a 2f 2f 73 |ion (at |http://s|
|000005f0| 70 6c 61 73 68 2e 6a 61 | 76 61 73 6f 66 74 2e 63 |plash.ja|vasoft.c|
|00000600| 6f 6d 2f 62 65 61 6e 73 | 2f 29 2c 0d 0a 77 68 69 |om/beans|/),..whi|
|00000610| 63 68 20 63 6f 6e 74 61 | 69 6e 73 20 74 68 65 20 |ch conta|ins the |
|00000620| 64 65 73 69 67 6e 20 67 | 6f 61 6c 73 2c 20 72 75 |design g|oals, ru|
|00000630| 6c 65 73 2c 20 61 6e 64 | 20 6e 61 6d 69 6e 67 20 |les, and| naming |
|00000640| 73 74 61 6e 64 61 72 64 | 73 20 66 6f 72 20 61 20 |standard|s for a |
|00000650| 4a 61 76 61 42 65 61 6e | 73 0d 0a 63 6f 6d 70 6f |JavaBean|s..compo|
|00000660| 6e 65 6e 74 2e 20 41 6e | 79 20 64 69 73 63 75 73 |nent. An|y discus|
|00000670| 73 69 6f 6e 20 6f 66 20 | 63 6f 6d 70 6f 6e 65 6e |sion of |componen|
|00000680| 74 73 20 69 6e 20 4a 42 | 75 69 6c 64 65 72 20 72 |ts in JB|uilder r|
|00000690| 65 66 65 72 73 20 74 6f | 20 4a 61 76 61 42 65 61 |efers to| JavaBea|
|000006a0| 6e 73 0d 0a 63 6f 6d 70 | 6f 6e 65 6e 74 73 2e 20 |ns..comp|onents. |
|000006b0| 41 20 4a 61 76 61 42 65 | 61 6e 20 6f 72 20 73 69 |A JavaBe|an or si|
|000006c0| 6d 70 6c 79 20 61 20 3c | 65 6d 3e 62 65 61 6e 20 |mply a <|em>bean |
|000006d0| 3c 2f 65 6d 3e 69 73 20 | 61 20 4a 61 76 61 42 65 |</em>is |a JavaBe|
|000006e0| 61 6e 73 20 63 6f 6d 70 | 6f 6e 65 6e 74 2e 0d 0a |ans comp|onent...|
|000006f0| 0d 0a 3c 50 3e 43 6f 6d | 70 6f 6e 65 6e 74 73 20 |..<P>Com|ponents |
|00000700| 61 72 65 20 74 68 65 20 | 62 75 69 6c 64 69 6e 67 |are the |building|
|00000710| 20 62 6c 6f 63 6b 73 20 | 6f 66 20 4a 42 75 69 6c | blocks |of JBuil|
|00000720| 64 65 72 20 61 70 70 6c | 69 63 61 74 69 6f 6e 73 |der appl|ications|
|00000730| 2e 20 41 6c 74 68 6f 75 | 67 68 0d 0a 6d 61 6e 79 |. Althou|gh..many|
|00000740| 20 63 6f 6d 70 6f 6e 65 | 6e 74 73 20 72 65 70 72 | compone|nts repr|
|00000750| 65 73 65 6e 74 20 76 69 | 73 69 62 6c 65 20 70 61 |esent vi|sible pa|
|00000760| 72 74 73 20 6f 66 20 61 | 20 75 73 65 72 20 69 6e |rts of a| user in|
|00000770| 74 65 72 66 61 63 65 2c | 20 63 6f 6d 70 6f 6e 65 |terface,| compone|
|00000780| 6e 74 73 0d 0a 63 61 6e | 20 61 6c 73 6f 20 72 65 |nts..can| also re|
|00000790| 70 72 65 73 65 6e 74 20 | 6e 6f 6e 76 69 73 75 61 |present |nonvisua|
|000007a0| 6c 20 65 6c 65 6d 65 6e | 74 73 20 69 6e 20 61 20 |l elemen|ts in a |
|000007b0| 70 72 6f 67 72 61 6d 2c | 20 73 75 63 68 20 61 73 |program,| such as|
|000007c0| 20 74 69 6d 65 72 73 20 | 61 6e 64 0d 0a 64 61 74 | timers |and..dat|
|000007d0| 61 62 61 73 65 73 2e 0d | 0a 0d 0a 3c 50 3e 54 68 |abases..|...<P>Th|
|000007e0| 65 72 65 20 61 72 65 20 | 74 68 72 65 65 20 77 61 |ere are |three wa|
|000007f0| 79 73 20 74 6f 20 76 69 | 65 77 20 63 6f 6d 70 6f |ys to vi|ew compo|
|00000800| 6e 65 6e 74 73 3a 0d 0a | 0d 0a 3c 55 4c 3e 0d 0a |nents:..|..<UL>..|
|00000810| 3c 4c 49 3e 0d 0a 3c 41 | 20 48 52 45 46 3d 22 23 |<LI>..<A| HREF="#|
|00000820| 63 6f 6d 70 6f 6e 65 6e | 74 75 73 65 72 73 64 65 |componen|tusersde|
|00000830| 66 69 6e 69 74 69 6f 6e | 22 3e 43 6f 6d 70 6f 6e |finition|">Compon|
|00000840| 65 6e 74 20 75 73 65 72 | 73 3c 2f 41 3e 20 73 65 |ent user|s</A> se|
|00000850| 65 20 63 6f 6d 70 6f 6e | 65 6e 74 73 0d 0a 61 73 |e compon|ents..as|
|00000860| 20 74 6f 6f 6c 73 20 66 | 6f 72 20 64 65 73 69 67 | tools f|or desig|
|00000870| 6e 69 6e 67 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |ning app|lication|
|00000880| 73 2e 3c 2f 4c 49 3e 0d | 0a 0d 0a 0d 0a 3c 50 3e |s.</LI>.|.....<P>|
|00000890| 0d 0a 3c 4c 49 3e 0d 0a | 3c 41 20 48 52 45 46 3d |..<LI>..|<A HREF=|
|000008a0| 22 23 63 6f 6d 70 6f 6e | 65 6e 74 77 72 69 74 65 |"#compon|entwrite|
|000008b0| 72 73 64 65 66 69 6e 69 | 74 69 6f 6e 22 3e 43 6f |rsdefini|tion">Co|
|000008c0| 6d 70 6f 6e 65 6e 74 20 | 77 72 69 74 65 72 73 3c |mponent |writers<|
|000008d0| 2f 41 3e 20 73 65 65 20 | 63 6f 6d 70 6f 6e 65 6e |/A> see |componen|
|000008e0| 74 73 0d 0a 61 73 20 74 | 68 65 20 63 61 72 65 66 |ts..as t|he caref|
|000008f0| 75 6c 6c 79 20 64 65 73 | 69 67 6e 65 64 20 6f 62 |ully des|igned ob|
|00000900| 6a 65 63 74 73 20 74 68 | 65 79 20 64 65 76 65 6c |jects th|ey devel|
|00000910| 6f 70 20 66 6f 72 20 6f | 74 68 65 72 73 20 74 6f |op for o|thers to|
|00000920| 20 75 73 65 20 69 6e 20 | 74 68 65 69 72 0d 0a 63 | use in |their..c|
|00000930| 6f 64 65 2e 3c 2f 4c 49 | 3e 0d 0a 0d 0a 0d 0a 3c |ode.</LI|>......<|
|00000940| 50 3e 0d 0a 3c 4c 49 3e | 0d 0a 3c 41 20 48 52 45 |P>..<LI>|..<A HRE|
|00000950| 46 3d 22 23 63 6f 6d 70 | 6f 6e 65 6e 74 73 74 65 |F="#comp|onentste|
|00000960| 63 68 6e 69 63 61 6c 64 | 65 66 69 6e 69 74 69 6f |chnicald|efinitio|
|00000970| 6e 22 3e 54 68 65 20 4a | 61 76 61 42 65 61 6e 73 |n">The J|avaBeans|
|00000980| 20 73 70 65 63 69 66 69 | 63 61 74 69 6f 6e 3c 2f | specifi|cation</|
|00000990| 41 3e 0d 0a 76 69 65 77 | 73 20 4a 61 76 61 42 65 |A>..view|s JavaBe|
|000009a0| 61 6e 73 20 61 73 20 63 | 6f 6d 70 6c 79 69 6e 67 |ans as c|omplying|
|000009b0| 20 77 69 74 68 20 63 65 | 72 74 61 69 6e 20 73 74 | with ce|rtain st|
|000009c0| 61 6e 64 61 72 64 73 20 | 61 6e 64 20 72 75 6c 65 |andards |and rule|
|000009d0| 73 2e 3c 2f 4c 49 3e 0d | 0a 0d 0a 0d 0a 3c 50 3e |s.</LI>.|.....<P>|
|000009e0| 3c 2f 55 4c 3e 0d 0a 0d | 0a 3c 41 20 4e 41 4d 45 |</UL>...|.<A NAME|
|000009f0| 3d 22 63 6f 6d 70 6f 6e | 65 6e 74 75 73 65 72 73 |="compon|entusers|
|00000a00| 64 65 66 69 6e 69 74 69 | 6f 6e 22 3e 3c 2f 41 3e |definiti|on"></A>|
|00000a10| 0d 0a 3c 48 33 3e 54 68 | 65 20 63 6f 6d 70 6f 6e |..<H3>Th|e compon|
|00000a20| 65 6e 74 20 75 73 65 72 | 27 73 20 76 69 65 77 20 |ent user|'s view |
|00000a30| 6f 66 20 61 20 63 6f 6d | 70 6f 6e 65 6e 74 3c 2f |of a com|ponent</|
|00000a40| 48 33 3e 0d 0a 3c 21 2d | 2d 42 4e 44 58 3d 22 63 |H3>..<!-|-BNDX="c|
|00000a50| 6f 6d 70 6f 6e 65 6e 74 | 73 3a 75 73 65 72 27 73 |omponent|s:user's|
|00000a60| 20 76 69 65 77 22 2d 2d | 3e 0d 0a 0d 0a 54 6f 20 | view"--|>....To |
|00000a70| 63 6f 6d 70 6f 6e 65 6e | 74 20 75 73 65 72 73 2c |componen|t users,|
|00000a80| 20 61 20 63 6f 6d 70 6f | 6e 65 6e 74 20 69 73 20 | a compo|nent is |
|00000a90| 61 20 73 65 6c 66 2d 63 | 6f 6e 74 61 69 6e 65 64 |a self-c|ontained|
|00000aa0| 2c 20 76 65 72 79 20 73 | 70 65 63 69 61 6c 69 7a |, very s|pecializ|
|00000ab0| 65 64 20 6f 62 6a 65 63 | 74 20 74 68 61 74 20 63 |ed objec|t that c|
|00000ac0| 61 6e 20 62 65 20 75 73 | 65 64 20 66 6f 72 20 61 |an be us|ed for a|
|00000ad0| 20 73 70 65 63 69 66 69 | 63 20 70 75 72 70 6f 73 | specifi|c purpos|
|00000ae0| 65 2e 20 49 74 20 63 61 | 6e 20 61 6c 73 6f 20 62 |e. It ca|n also b|
|00000af0| 65 20 75 73 65 64 20 6d | 6f 72 65 20 74 68 61 6e |e used m|ore than|
|00000b00| 20 6f 6e 63 65 20 61 6e | 64 20 69 6e 20 6d 6f 72 | once an|d in mor|
|00000b10| 65 20 74 68 61 6e 20 6f | 6e 65 20 70 6c 61 63 65 |e than o|ne place|
|00000b20| 20 77 69 74 68 69 6e 20 | 61 6e 20 61 70 70 6c 65 | within |an apple|
|00000b30| 74 20 6f 72 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |t or app|lication|
|00000b40| 2e 20 54 68 65 20 63 6f | 6d 70 6f 6e 65 6e 74 20 |. The co|mponent |
|00000b50| 75 73 65 72 20 65 78 70 | 65 63 74 73 20 66 65 77 |user exp|ects few|
|00000b60| 20 72 65 73 74 72 69 63 | 74 69 6f 6e 73 20 6f 6e | restric|tions on|
|00000b70| 20 68 6f 77 20 74 68 65 | 20 63 6f 6d 70 6f 6e 65 | how the| compone|
|00000b80| 6e 74 20 63 61 6e 20 62 | 65 20 75 73 65 64 2e 20 |nt can b|e used. |
|00000b90| 49 6e 20 61 20 76 69 73 | 75 61 6c 20 65 6e 76 69 |In a vis|ual envi|
|00000ba0| 72 6f 6e 6d 65 6e 74 20 | 73 75 63 68 20 61 73 20 |ronment |such as |
|00000bb0| 4a 42 75 69 6c 64 65 72 | 2c 20 74 68 65 20 75 73 |JBuilder|, the us|
|00000bc0| 65 72 20 73 65 6c 65 63 | 74 73 20 74 68 65 20 63 |er selec|ts the c|
|00000bd0| 6f 6d 70 6f 6e 65 6e 74 | 20 66 72 6f 6d 20 74 68 |omponent| from th|
|00000be0| 65 20 43 6f 6d 70 6f 6e | 65 6e 74 20 50 61 6c 65 |e Compon|ent Pale|
|00000bf0| 74 74 65 20 61 6e 64 20 | 64 72 6f 70 73 20 69 74 |tte and |drops it|
|00000c00| 20 69 6e 74 6f 20 74 68 | 65 20 61 70 70 6c 69 63 | into th|e applic|
|00000c10| 61 74 69 6f 6e 20 6f 72 | 20 61 70 70 6c 65 74 2e |ation or| applet.|
|00000c20| 0d 0a 0d 0a 3c 50 3e 42 | 65 66 6f 72 65 20 79 6f |....<P>B|efore yo|
|00000c30| 75 20 61 74 74 65 6d 70 | 74 20 74 6f 20 77 72 69 |u attemp|t to wri|
|00000c40| 74 65 20 63 6f 6d 70 6f | 6e 65 6e 74 73 2c 20 77 |te compo|nents, w|
|00000c50| 65 20 73 74 72 6f 6e 67 | 6c 79 20 72 65 63 6f 6d |e strong|ly recom|
|00000c60| 6d 65 6e 64 20 74 68 61 | 74 20 79 6f 75 0d 0a 62 |mend tha|t you..b|
|00000c70| 65 63 6f 6d 65 20 66 61 | 6d 69 6c 69 61 72 20 77 |ecome fa|miliar w|
|00000c80| 69 74 68 20 74 68 65 20 | 65 78 69 73 74 69 6e 67 |ith the |existing|
|00000c90| 20 63 6f 6d 70 6f 6e 65 | 6e 74 73 20 69 6e 20 4a | compone|nts in J|
|00000ca0| 42 75 69 6c 64 65 72 2e | 20 49 66 20 79 6f 75 20 |Builder.| If you |
|00000cb0| 61 64 6f 70 74 20 74 68 | 65 20 6d 6f 64 65 6c 2d |adopt th|e model-|
|00000cc0| 76 69 65 77 20 61 72 63 | 68 69 74 65 63 74 75 72 |view arc|hitectur|
|00000cd0| 65 20 75 73 65 64 20 62 | 79 20 74 68 65 20 4a 42 |e used b|y the JB|
|00000ce0| 43 4c 20 63 6f 6d 70 6f | 6e 65 6e 74 73 2c 20 79 |CL compo|nents, y|
|00000cf0| 6f 75 27 6c 6c 20 62 65 | 20 75 73 69 6e 67 20 61 |ou'll be| using a|
|00000d00| 20 66 6c 65 78 69 62 6c | 65 20 61 6e 64 20 70 6f | flexibl|e and po|
|00000d10| 77 65 72 66 75 6c 20 73 | 74 79 6c 65 20 6f 66 20 |werful s|tyle of |
|00000d20| 63 6f 6d 70 6f 6e 65 6e | 74 20 77 72 69 74 69 6e |componen|t writin|
|00000d30| 67 2e 0d 0a 0d 0a 3c 41 | 20 4e 41 4d 45 3d 22 63 |g.....<A| NAME="c|
|00000d40| 6f 6d 70 6f 6e 65 6e 74 | 77 72 69 74 65 72 73 64 |omponent|writersd|
|00000d50| 65 66 69 6e 69 74 69 6f | 6e 22 3e 3c 2f 41 3e 0d |efinitio|n"></A>.|
|00000d60| 0a 3c 48 33 3e 54 68 65 | 20 63 6f 6d 70 6f 6e 65 |.<H3>The| compone|
|00000d70| 6e 74 20 77 72 69 74 65 | 72 27 73 20 76 69 65 77 |nt write|r's view|
|00000d80| 20 6f 66 20 61 20 63 6f | 6d 70 6f 6e 65 6e 74 3c | of a co|mponent<|
|00000d90| 2f 48 33 3e 0d 0a 3c 21 | 2d 2d 42 4e 44 58 3d 22 |/H3>..<!|--BNDX="|
|00000da0| 63 6f 6d 70 6f 6e 65 6e | 74 73 3a 77 72 69 74 65 |componen|ts:write|
|00000db0| 72 27 73 20 76 69 65 77 | 22 2d 2d 3e 0d 0a 0d 0a |r's view|"-->....|
|00000dc0| 46 6f 72 20 61 20 63 6f | 6d 70 6f 6e 65 6e 74 20 |For a co|mponent |
|00000dd0| 77 72 69 74 65 72 2c 20 | 61 20 63 6f 6d 70 6f 6e |writer, |a compon|
|00000de0| 65 6e 74 20 63 61 6e 0d | 0a 64 6f 20 6f 72 20 62 |ent can.|.do or b|
|00000df0| 65 20 61 6e 79 74 68 69 | 6e 67 20 79 6f 75 20 63 |e anythi|ng you c|
|00000e00| 61 6e 20 63 72 65 61 74 | 65 20 69 6e 20 63 6f 64 |an creat|e in cod|
|00000e10| 65 2c 20 61 73 20 6c 6f | 6e 67 20 61 73 20 69 74 |e, as lo|ng as it|
|00000e20| 20 66 69 74 73 20 74 68 | 65 20 4a 61 76 61 42 65 | fits th|e JavaBe|
|00000e30| 61 6e 73 0d 0a 73 70 65 | 63 69 66 69 63 61 74 69 |ans..spe|cificati|
|00000e40| 6f 6e 2e 20 54 68 69 73 | 20 6d 61 6e 75 61 6c 20 |on. This| manual |
|00000e50| 65 78 70 6c 61 69 6e 73 | 20 68 6f 77 20 74 6f 20 |explains| how to |
|00000e60| 77 72 69 74 65 20 63 6f | 6d 70 6f 6e 65 6e 74 73 |write co|mponents|
|00000e70| 20 74 68 61 74 20 63 6f | 6d 70 6c 79 0d 0a 77 69 | that co|mply..wi|
|00000e80| 74 68 20 74 68 65 20 73 | 70 65 63 69 66 69 63 61 |th the s|pecifica|
|00000e90| 74 69 6f 6e 20 61 6e 64 | 20 77 6f 72 6b 20 69 6e |tion and| work in|
|00000ea0| 20 4a 42 75 69 6c 64 65 | 72 2e 0d 0a 0d 0a 3c 50 | JBuilde|r.....<P|
|00000eb0| 3e 44 65 66 69 6e 69 6e | 67 20 74 68 65 20 6c 69 |>Definin|g the li|
|00000ec0| 6d 69 74 73 20 6f 66 20 | 63 6f 6d 70 6f 6e 65 6e |mits of |componen|
|00000ed0| 74 20 77 72 69 74 69 6e | 67 20 69 73 20 6d 75 63 |t writin|g is muc|
|00000ee0| 68 20 6c 69 6b 65 20 64 | 65 66 69 6e 69 6e 67 20 |h like d|efining |
|00000ef0| 74 68 65 0d 0a 6c 69 6d | 69 74 73 20 6f 66 20 70 |the..lim|its of p|
|00000f00| 72 6f 67 72 61 6d 6d 69 | 6e 67 2e 20 57 65 20 63 |rogrammi|ng. We c|
|00000f10| 61 6e 27 74 20 74 65 6c | 6c 20 79 6f 75 20 65 76 |an't tel|l you ev|
|00000f20| 65 72 79 20 6b 69 6e 64 | 20 6f 66 20 63 6f 6d 70 |ery kind| of comp|
|00000f30| 6f 6e 65 6e 74 20 79 6f | 75 20 63 61 6e 0d 0a 63 |onent yo|u can..c|
|00000f40| 72 65 61 74 65 2c 20 61 | 6e 79 20 6d 6f 72 65 20 |reate, a|ny more |
|00000f50| 74 68 61 6e 20 77 65 20 | 63 61 6e 20 74 65 6c 6c |than we |can tell|
|00000f60| 20 79 6f 75 20 61 6c 6c | 20 74 68 65 20 70 72 6f | you all| the pro|
|00000f70| 67 72 61 6d 73 20 79 6f | 75 20 63 61 6e 20 77 72 |grams yo|u can wr|
|00000f80| 69 74 65 2e 20 57 68 61 | 74 0d 0a 77 65 20 63 61 |ite. Wha|t..we ca|
|00000f90| 6e 20 64 6f 20 69 73 20 | 74 65 6c 6c 20 79 6f 75 |n do is |tell you|
|00000fa0| 20 68 6f 77 20 74 6f 20 | 77 72 69 74 65 20 79 6f | how to |write yo|
|00000fb0| 75 72 20 63 6f 64 65 20 | 73 6f 20 74 68 61 74 20 |ur code |so that |
|00000fc0| 69 74 20 66 69 74 73 20 | 77 65 6c 6c 20 69 6e 20 |it fits |well in |
|00000fd0| 74 68 65 0d 0a 4a 42 75 | 69 6c 64 65 72 20 65 6e |the..JBu|ilder en|
|00000fe0| 76 69 72 6f 6e 6d 65 6e | 74 20 61 6e 64 20 73 6f |vironmen|t and so|
|00000ff0| 20 79 6f 75 20 63 61 6e | 20 75 73 65 20 74 68 65 | you can| use the|
|00001000| 6d 20 69 6e 20 6f 74 68 | 65 72 20 76 69 73 75 61 |m in oth|er visua|
|00001010| 6c 20 74 6f 6f 6c 73 20 | 74 68 61 74 20 73 75 70 |l tools |that sup|
|00001020| 70 6f 72 74 20 74 68 65 | 20 4a 61 76 61 42 65 61 |port the| JavaBea|
|00001030| 6e 73 20 73 74 61 6e 64 | 61 72 64 2e 0d 0a 0d 0a |ns stand|ard.....|
|00001040| 3c 41 20 4e 41 4d 45 3d | 22 63 6f 6d 70 6f 6e 65 |<A NAME=|"compone|
|00001050| 6e 74 73 74 65 63 68 6e | 69 63 61 6c 64 65 66 69 |ntstechn|icaldefi|
|00001060| 6e 69 74 69 6f 6e 22 3e | 3c 2f 41 3e 0d 0a 3c 48 |nition">|</A>..<H|
|00001070| 33 3e 54 68 65 20 4a 61 | 76 61 42 65 61 6e 73 20 |3>The Ja|vaBeans |
|00001080| 76 69 65 77 20 6f 66 20 | 61 20 63 6f 6d 70 6f 6e |view of |a compon|
|00001090| 65 6e 74 3c 2f 48 33 3e | 0d 0a 3c 21 2d 2d 42 4e |ent</H3>|..<!--BN|
|000010a0| 44 58 3d 22 63 6f 6d 70 | 6f 6e 65 6e 74 73 3a 64 |DX="comp|onents:d|
|000010b0| 65 66 69 6e 65 64 3b 4a | 61 76 61 42 65 61 6e 73 |efined;J|avaBeans|
|000010c0| 22 2d 2d 3e 0d 0a 0d 0a | 41 74 20 74 68 65 20 73 |"-->....|At the s|
|000010d0| 69 6d 70 6c 65 73 74 20 | 6c 65 76 65 6c 2c 20 61 |implest |level, a|
|000010e0| 20 63 6f 6d 70 6f 6e 65 | 6e 74 0d 0a 69 73 20 61 | compone|nt..is a|
|000010f0| 6e 79 20 4a 61 76 61 20 | 63 6c 61 73 73 20 74 68 |ny Java |class th|
|00001100| 61 74 20 63 6f 6e 66 6f | 72 6d 73 20 74 6f 20 74 |at confo|rms to t|
|00001110| 68 65 20 4a 61 76 61 42 | 65 61 6e 73 20 63 6f 6d |he JavaB|eans com|
|00001120| 70 6f 6e 65 6e 74 20 6d | 6f 64 65 6c 2e 20 49 66 |ponent m|odel. If|
|00001130| 20 61 0d 0a 63 6c 61 73 | 73 20 66 6f 6c 6c 6f 77 | a..clas|s follow|
|00001140| 73 20 74 68 65 20 3c 41 | 20 48 52 45 46 3d 22 23 |s the <A| HREF="#|
|00001150| 6a 61 76 61 62 65 61 6e | 73 72 65 71 75 69 72 65 |javabean|srequire|
|00001160| 6d 65 6e 74 73 22 3e 4a | 61 76 61 42 65 61 6e 73 |ments">J|avaBeans|
|00001170| 20 72 75 6c 65 73 3c 2f | 41 3e 2c 0d 0a 69 74 20 | rules</|A>,..it |
|00001180| 63 61 6e 20 77 6f 72 6b | 20 77 69 74 68 20 4a 42 |can work| with JB|
|00001190| 75 69 6c 64 65 72 27 73 | 20 76 69 73 75 61 6c 20 |uilder's| visual |
|000011a0| 64 65 73 69 67 6e 20 74 | 6f 6f 6c 73 2e 20 41 20 |design t|ools. A |
|000011b0| 4a 61 76 61 42 65 61 6e | 20 68 61 73 20 74 68 65 |JavaBean| has the|
|000011c0| 73 65 0d 0a 63 68 61 72 | 61 63 74 65 72 69 73 74 |se..char|acterist|
|000011d0| 69 63 73 3a 3c 70 3e 0d | 0a 3c 55 4c 3e 0d 0a 3c |ics:<p>.|.<UL>..<|
|000011e0| 4c 49 3e 0d 0a 49 74 20 | 69 73 20 61 20 3c 73 74 |LI>..It |is a <st|
|000011f0| 72 6f 6e 67 3e 70 75 62 | 6c 69 63 3c 2f 73 74 72 |rong>pub|lic</str|
|00001200| 6f 6e 67 3e 20 63 6c 61 | 73 73 2e 3c 2f 4c 49 3e |ong> cla|ss.</LI>|
|00001210| 0d 0a 0d 0a 3c 4c 49 3e | 0d 0a 49 74 20 68 61 73 |....<LI>|..It has|
|00001220| 20 61 20 3c 73 74 72 6f | 6e 67 3e 70 75 62 6c 69 | a <stro|ng>publi|
|00001230| 63 3c 2f 73 74 72 6f 6e | 67 3e 20 70 61 72 61 6d |c</stron|g> param|
|00001240| 65 74 65 72 6c 65 73 73 | 20 63 6f 6e 73 74 72 75 |eterless| constru|
|00001250| 63 74 6f 72 20 28 74 68 | 6f 75 67 68 20 69 74 20 |ctor (th|ough it |
|00001260| 6d 61 79 20 68 61 76 65 | 20 6f 74 68 65 72 20 63 |may have| other c|
|00001270| 6f 6e 73 74 72 75 63 74 | 6f 72 73 0d 0a 61 73 20 |onstruct|ors..as |
|00001280| 77 65 6c 6c 29 2e 3c 2f | 4c 49 3e 0d 0a 0d 0a 3c |well).</|LI>....<|
|00001290| 4c 49 3e 0d 0a 49 74 20 | 68 61 73 20 70 72 6f 70 |LI>..It |has prop|
|000012a0| 65 72 74 69 65 73 20 77 | 69 74 68 20 63 6f 72 72 |erties w|ith corr|
|000012b0| 65 63 74 6c 79 20 63 6f | 6e 73 74 72 75 63 74 65 |ectly co|nstructe|
|000012c0| 64 20 3c 41 20 48 52 45 | 46 3d 22 70 72 6f 70 65 |d <A HRE|F="prope|
|000012d0| 72 74 69 65 73 2e 68 74 | 6d 6c 23 77 72 69 74 69 |rties.ht|ml#writi|
|000012e0| 6e 67 61 63 63 65 73 73 | 6f 72 6d 65 74 68 6f 64 |ngaccess|ormethod|
|000012f0| 73 22 3e 61 63 63 65 73 | 73 6f 72 0d 0a 6d 65 74 |s">acces|sor..met|
|00001300| 68 6f 64 73 3c 2f 41 3e | 2e 3c 2f 4c 49 3e 0d 0a |hods</A>|.</LI>..|
|00001310| 0d 0a 3c 4c 49 3e 0d 0a | 49 74 20 68 61 73 20 65 |..<LI>..|It has e|
|00001320| 76 65 6e 74 73 20 77 69 | 74 68 20 63 6f 72 72 65 |vents wi|th corre|
|00001330| 63 74 6c 79 20 63 6f 6e | 73 74 72 75 63 74 65 64 |ctly con|structed|
|00001340| 20 3c 41 20 48 52 45 46 | 3d 22 65 76 65 6e 74 73 | <A HREF|="events|
|00001350| 32 2e 68 74 6d 6c 23 52 | 65 67 69 73 74 65 72 69 |2.html#R|egisteri|
|00001360| 6e 67 20 61 20 6c 69 73 | 74 65 6e 65 72 20 77 69 |ng a lis|tener wi|
|00001370| 74 68 20 74 68 65 20 73 | 6f 75 72 63 65 20 63 6f |th the s|ource co|
|00001380| 6d 70 6f 6e 65 6e 74 22 | 3e 72 65 67 69 73 74 72 |mponent"|>registr|
|00001390| 61 74 69 6f 6e 0d 0a 6d | 65 74 68 6f 64 73 3c 2f |ation..m|ethods</|
|000013a0| 41 3e 2e 3c 2f 4c 49 3e | 0d 0a 3c 2f 55 4c 3e 0d |A>.</LI>|..</UL>.|
|000013b0| 0a 0d 0a 0d 0a 3c 41 20 | 4e 41 4d 45 3d 22 6b 69 |.....<A |NAME="ki|
|000013c0| 6e 64 73 6f 66 63 6f 6d | 70 6f 6e 65 6e 74 73 22 |ndsofcom|ponents"|
|000013d0| 3e 3c 2f 41 3e 0d 0a 3c | 48 33 3e 4b 69 6e 64 73 |></A>..<|H3>Kinds|
|000013e0| 20 6f 66 20 63 6f 6d 70 | 6f 6e 65 6e 74 73 3c 2f | of comp|onents</|
|000013f0| 48 33 3e 0d 0a 3c 21 2d | 2d 42 4e 44 58 3d 22 63 |H3>..<!-|-BNDX="c|
|00001400| 6f 6d 70 6f 6e 65 6e 74 | 73 3a 6b 69 6e 64 73 22 |omponent|s:kinds"|
|00001410| 2d 2d 3e 0d 0a 0d 0a 42 | 65 63 61 75 73 65 20 63 |-->....B|ecause c|
|00001420| 6f 6d 70 6f 6e 65 6e 74 | 73 20 63 61 6e 20 62 65 |omponent|s can be|
|00001430| 20 61 6c 6d 6f 73 74 20 | 61 6e 79 20 70 61 72 74 | almost |any part|
|00001440| 20 6f 66 20 61 6e 20 6f | 62 6a 65 63 74 2d 6f 72 | of an o|bject-or|
|00001450| 69 65 6e 74 65 64 20 70 | 72 6f 67 72 61 6d 2c 20 |iented p|rogram, |
|00001460| 74 68 65 20 74 65 72 6d | 69 6e 6f 6c 6f 67 79 20 |the term|inology |
|00001470| 75 73 65 64 20 74 6f 20 | 74 61 6c 6b 20 61 62 6f |used to |talk abo|
|00001480| 75 74 20 74 68 65 6d 20 | 69 73 20 6f 66 74 65 6e |ut them |is often|
|00001490| 20 63 6f 6d 70 6c 65 78 | 20 61 6e 64 20 63 6f 6e | complex| and con|
|000014a0| 66 75 73 69 6e 67 2e 20 | 49 6e 20 74 68 65 20 4a |fusing. |In the J|
|000014b0| 42 75 69 6c 64 65 72 20 | 64 6f 63 75 6d 65 6e 74 |Builder |document|
|000014c0| 61 74 69 6f 6e 20 77 65 | 20 75 73 65 20 73 65 76 |ation we| use sev|
|000014d0| 65 72 61 6c 20 74 65 72 | 6d 73 20 66 6f 72 20 63 |eral ter|ms for c|
|000014e0| 6f 6d 70 6f 6e 65 6e 74 | 73 3b 20 73 6f 6d 65 74 |omponent|s; somet|
|000014f0| 69 6d 65 73 20 74 68 65 | 20 64 65 66 69 6e 69 74 |imes the| definit|
|00001500| 69 6f 6e 73 20 6f 66 20 | 74 68 65 20 74 65 72 6d |ions of |the term|
|00001510| 73 20 6f 76 65 72 6c 61 | 70 3a 0d 0a 3c 70 3e 0d |s overla|p:..<p>.|
|00001520| 0a 3c 55 4c 3e 0d 0a 3c | 4c 49 3e 0d 0a 3c 41 20 |.<UL>..<|LI>..<A |
|00001530| 48 52 45 46 3d 22 23 76 | 69 73 75 61 6c 61 6e 64 |HREF="#v|isualand|
|00001540| 6e 6f 6e 76 69 73 75 61 | 6c 63 6f 6d 70 6f 6e 65 |nonvisua|lcompone|
|00001550| 6e 74 73 22 3e 55 49 20 | 28 75 73 65 72 20 69 6e |nts">UI |(user in|
|00001560| 74 65 72 66 61 63 65 29 | 20 63 6f 6d 70 6f 6e 65 |terface)| compone|
|00001570| 6e 74 73 3c 2f 41 3e 3c | 2f 4c 49 3e 0d 0a 0d 0a |nts</A><|/LI>....|
|00001580| 3c 4c 49 3e 0d 0a 3c 41 | 20 48 52 45 46 3d 22 23 |<LI>..<A| HREF="#|
|00001590| 76 69 73 75 61 6c 61 6e | 64 6e 6f 6e 76 69 73 75 |visualan|dnonvisu|
|000015a0| 61 6c 63 6f 6d 70 6f 6e | 65 6e 74 73 22 3e 4e 6f |alcompon|ents">No|
|000015b0| 6e 2d 55 49 20 63 6f 6d | 70 6f 6e 65 6e 74 73 3c |n-UI com|ponents<|
|000015c0| 2f 41 3e 3c 2f 4c 49 3e | 0d 0a 0d 0a 3c 4c 49 3e |/A></LI>|....<LI>|
|000015d0| 0d 0a 3c 41 20 48 52 45 | 46 3d 22 23 6d 65 6e 75 |..<A HRE|F="#menu|
|000015e0| 63 6f 6d 70 6f 6e 65 6e | 74 73 22 3e 4d 65 6e 75 |componen|ts">Menu|
|000015f0| 20 63 6f 6d 70 6f 6e 65 | 6e 74 73 3c 2f 41 3e 3c | compone|nts</A><|
|00001600| 2f 4c 49 3e 0d 0a 0d 0a | 3c 4c 49 3e 0d 0a 3c 41 |/LI>....|<LI>..<A|
|00001610| 20 48 52 45 46 3d 22 23 | 63 6f 6d 70 6f 73 69 74 | HREF="#|composit|
|00001620| 65 22 3e 43 6f 6d 70 6f | 73 69 74 65 20 63 6f 6d |e">Compo|site com|
|00001630| 70 6f 6e 65 6e 74 73 3c | 2f 41 3e 3c 2f 4c 49 3e |ponents<|/A></LI>|
|00001640| 0d 0a 0d 0a 3c 4c 49 3e | 0d 0a 3c 41 20 48 52 45 |....<LI>|..<A HRE|
|00001650| 46 3d 22 23 63 6f 6e 74 | 72 6f 6c 73 22 3e 43 6f |F="#cont|rols">Co|
|00001660| 6e 74 72 6f 6c 73 3c 2f | 41 3e 3c 2f 4c 49 3e 0d |ntrols</|A></LI>.|
|00001670| 0a 3c 2f 55 4c 3e 0d 0a | 3c 70 3e 54 68 65 73 65 |.</UL>..|<p>These|
|00001680| 20 63 6f 6d 70 6f 6e 65 | 6e 74 20 63 61 74 65 67 | compone|nt categ|
|00001690| 6f 72 69 65 73 20 61 72 | 65 20 64 69 73 63 75 73 |ories ar|e discus|
|000016a0| 73 65 64 20 69 6e 20 67 | 72 65 61 74 65 72 20 64 |sed in g|reater d|
|000016b0| 65 74 61 69 6c 20 62 65 | 6c 6f 77 2e 0d 0a 0d 0a |etail be|low.....|
|000016c0| 0d 0a 3c 41 20 4e 41 4d | 45 3d 22 76 69 73 75 61 |..<A NAM|E="visua|
|000016d0| 6c 61 6e 64 6e 6f 6e 76 | 69 73 75 61 6c 63 6f 6d |landnonv|isualcom|
|000016e0| 70 6f 6e 65 6e 74 73 22 | 3e 3c 2f 41 3e 0d 0a 3c |ponents"|></A>..<|
|000016f0| 48 34 3e 55 49 20 61 6e | 64 20 6e 6f 6e 2d 55 49 |H4>UI an|d non-UI|
|00001700| 20 63 6f 6d 70 6f 6e 65 | 6e 74 73 3c 2f 48 34 3e | compone|nts</H4>|
|00001710| 0d 0a 3c 21 2d 2d 42 4e | 44 58 3d 22 63 6f 6d 70 |..<!--BN|DX="comp|
|00001720| 6f 6e 65 6e 74 73 3a 55 | 49 20 76 73 2e 20 6e 6f |onents:U|I vs. no|
|00001730| 6e 2d 55 49 3b 55 49 20 | 63 6f 6d 70 6f 6e 65 6e |n-UI;UI |componen|
|00001740| 74 73 3b 6e 6f 6e 2d 55 | 49 20 63 6f 6d 70 6f 6e |ts;non-U|I compon|
|00001750| 65 6e 74 73 22 2d 2d 3e | 0d 0a 0d 0a 41 6c 6c 20 |ents"-->|....All |
|00001760| 63 6f 6d 70 6f 6e 65 6e | 74 73 20 61 72 65 20 65 |componen|ts are e|
|00001770| 69 74 68 65 72 20 55 49 | 20 28 75 73 65 72 20 69 |ither UI| (user i|
|00001780| 6e 74 65 72 66 61 63 65 | 29 20 63 6f 6d 70 6f 6e |nterface|) compon|
|00001790| 65 6e 74 73 20 6f 72 20 | 6e 6f 6e 2d 55 49 20 63 |ents or |non-UI c|
|000017a0| 6f 6d 70 6f 6e 65 6e 74 | 73 2e 0d 0a 41 20 3c 65 |omponent|s...A <e|
|000017b0| 6d 3e 55 49 20 63 6f 6d | 70 6f 6e 65 6e 74 20 3c |m>UI com|ponent <|
|000017c0| 2f 65 6d 3e 63 61 6e 20 | 64 72 61 77 20 73 6f 6d |/em>can |draw som|
|000017d0| 65 74 68 69 6e 67 20 6f | 6e 20 74 68 65 20 73 63 |ething o|n the sc|
|000017e0| 72 65 65 6e 2c 20 62 65 | 63 6f 6d 69 6e 67 20 70 |reen, be|coming p|
|000017f0| 61 72 74 20 6f 66 0d 0a | 74 68 65 20 75 73 65 72 |art of..|the user|
|00001800| 20 69 6e 74 65 72 66 61 | 63 65 20 6f 66 20 74 68 | interfa|ce of th|
|00001810| 65 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 2e 20 42 |e applic|ation. B|
|00001820| 75 74 74 6f 6e 73 2c 20 | 74 65 78 74 20 62 6f 78 |uttons, |text box|
|00001830| 65 73 2c 20 63 68 65 63 | 6b 62 6f 78 65 73 2c 0d |es, chec|kboxes,.|
|00001840| 0a 6c 61 62 65 6c 73 2c | 20 61 6e 64 20 69 6d 61 |.labels,| and ima|
|00001850| 67 65 20 63 6f 6d 70 6f | 6e 65 6e 74 73 20 61 72 |ge compo|nents ar|
|00001860| 65 20 61 6c 6c 20 55 49 | 20 63 6f 6d 70 6f 6e 65 |e all UI| compone|
|00001870| 6e 74 73 2e 20 57 68 65 | 74 68 65 72 20 74 68 65 |nts. Whe|ther the|
|00001880| 20 63 6f 6d 70 6f 6e 65 | 6e 74 0d 0a 61 63 74 75 | compone|nt..actu|
|00001890| 61 6c 6c 79 20 73 68 6f | 77 73 20 73 6f 6d 65 74 |ally sho|ws somet|
|000018a0| 68 69 6e 67 20 6f 6e 20 | 74 68 65 20 73 63 72 65 |hing on |the scre|
|000018b0| 65 6e 20 61 74 20 72 75 | 6e 74 69 6d 65 20 69 73 |en at ru|ntime is|
|000018c0| 20 75 6e 69 6d 70 6f 72 | 74 61 6e 74 2e 20 49 74 | unimpor|tant. It|
|000018d0| 20 69 73 0d 0a 73 69 6d | 70 6c 79 20 74 68 65 20 | is..sim|ply the |
|000018e0| 63 6f 6d 70 6f 6e 65 6e | 74 27 73 20 61 62 69 6c |componen|t's abil|
|000018f0| 69 74 79 20 74 6f 20 70 | 61 69 6e 74 20 74 6f 20 |ity to p|aint to |
|00001900| 74 68 65 20 73 63 72 65 | 65 6e 20 74 68 61 74 20 |the scre|en that |
|00001910| 63 6c 61 73 73 69 66 69 | 65 73 20 61 0d 0a 63 6f |classifi|es a..co|
|00001920| 6d 70 6f 6e 65 6e 74 20 | 61 73 20 61 20 55 49 20 |mponent |as a UI |
|00001930| 63 6f 6d 70 6f 6e 65 6e | 74 2e 0d 0a 0d 0a 3c 50 |componen|t.....<P|
|00001940| 3e 55 49 20 63 6f 6d 70 | 6f 6e 65 6e 74 73 20 6d |>UI comp|onents m|
|00001950| 75 73 74 20 61 6c 77 61 | 79 73 20 65 78 74 65 6e |ust alwa|ys exten|
|00001960| 64 20 73 6f 6d 65 20 63 | 6c 61 73 73 20 74 68 61 |d some c|lass tha|
|00001970| 74 20 69 73 20 63 61 70 | 61 62 6c 65 20 6f 66 20 |t is cap|able of |
|00001980| 64 72 61 77 69 6e 67 0d | 0a 74 6f 20 74 68 65 20 |drawing.|.to the |
|00001990| 73 63 72 65 65 6e 2e 20 | 55 6c 74 69 6d 61 74 65 |screen. |Ultimate|
|000019a0| 6c 79 2c 20 74 68 65 79 | 20 61 6c 6c 20 64 65 73 |ly, they| all des|
|000019b0| 63 65 6e 64 20 66 72 6f | 6d 20 3c 65 6d 3e 6a 61 |cend fro|m <em>ja|
|000019c0| 76 61 2e 61 77 74 2e 43 | 6f 6d 70 6f 6e 65 6e 74 |va.awt.C|omponent|
|000019d0| 3c 2f 65 6d 3e 2e 0d 0a | 55 73 75 61 6c 6c 79 20 |</em>...|Usually |
|000019e0| 79 6f 75 20 73 68 6f 75 | 6c 64 20 65 78 74 65 6e |you shou|ld exten|
|000019f0| 64 20 61 6e 20 65 78 69 | 73 74 69 6e 67 20 63 6f |d an exi|sting co|
|00001a00| 6d 70 6f 6e 65 6e 74 20 | 20 74 6f 20 62 65 20 63 |mponent | to be c|
|00001a10| 65 72 74 61 69 6e 20 74 | 68 61 74 20 79 6f 75 20 |ertain t|hat you |
|00001a20| 69 6d 70 6c 65 6d 65 6e | 74 20 61 6c 6c 20 74 68 |implemen|t all th|
|00001a30| 65 20 6d 65 74 68 6f 64 | 73 20 74 68 61 74 20 74 |e method|s that t|
|00001a40| 68 65 20 4a 61 76 61 42 | 65 61 6e 73 20 6d 6f 64 |he JavaB|eans mod|
|00001a50| 65 6c 20 3c 41 20 48 52 | 45 46 3d 22 23 6a 61 76 |el <A HR|EF="#jav|
|00001a60| 61 62 65 61 6e 73 72 65 | 71 75 69 72 65 6d 65 6e |abeansre|quiremen|
|00001a70| 74 73 22 3e 72 65 71 75 | 69 72 65 73 3c 2f 41 3e |ts">requ|ires</A>|
|00001a80| 2e 0d 0a 0d 0a 3c 50 3e | 3c 65 6d 3e 4e 6f 6e 2d |.....<P>|<em>Non-|
|00001a90| 55 49 3c 2f 65 6d 3e 20 | 63 6f 6d 70 6f 6e 65 6e |UI</em> |componen|
|00001aa0| 74 73 2c 20 69 6e 20 63 | 6f 6e 74 72 61 73 74 2c |ts, in c|ontrast,|
|00001ab0| 20 63 61 6e 20 65 78 74 | 65 6e 64 20 61 6e 79 20 | can ext|end any |
|00001ac0| 61 70 70 72 6f 70 72 69 | 61 74 65 20 63 6c 61 73 |appropri|ate clas|
|00001ad0| 73 2e 20 54 68 65 79 0d | 0a 6d 75 73 74 20 73 69 |s. They.|.must si|
|00001ae0| 6d 70 6c 79 20 6f 62 65 | 79 20 74 68 65 20 62 61 |mply obe|y the ba|
|00001af0| 73 69 63 20 72 75 6c 65 | 73 20 66 6f 72 20 63 6f |sic rule|s for co|
|00001b00| 6d 70 6f 6e 65 6e 74 73 | 3a 20 74 68 65 79 20 68 |mponents|: they h|
|00001b10| 61 76 65 20 61 20 3c 73 | 74 72 6f 6e 67 3e 70 75 |ave a <s|trong>pu|
|00001b20| 62 6c 69 63 3c 2f 73 74 | 72 6f 6e 67 3e 0d 0a 70 |blic</st|rong>..p|
|00001b30| 61 72 61 6d 65 74 65 72 | 6c 65 73 73 20 63 6f 6e |arameter|less con|
|00001b40| 73 74 72 75 63 74 6f 72 | 20 61 6e 64 20 70 72 6f |structor| and pro|
|00001b50| 70 65 72 6c 79 20 6e 61 | 6d 65 64 20 61 6e 64 20 |perly na|med and |
|00001b60| 63 6f 6e 73 74 72 75 63 | 74 65 64 20 61 63 63 65 |construc|ted acce|
|00001b70| 73 73 6f 72 20 6d 65 74 | 68 6f 64 73 0d 0a 66 6f |ssor met|hods..fo|
|00001b80| 72 20 70 72 6f 70 65 72 | 74 69 65 73 20 61 6e 64 |r proper|ties and|
|00001b90| 20 65 76 65 6e 74 73 20 | 74 68 65 79 20 73 75 72 | events |they sur|
|00001ba0| 66 61 63 65 20 61 74 20 | 64 65 73 69 67 6e 20 74 |face at |design t|
|00001bb0| 69 6d 65 2e 0d 0a 0d 0a | 3c 50 3e 4e 6f 6e 2d 55 |ime.....|<P>Non-U|
|00001bc0| 49 20 63 6f 6d 70 6f 6e | 65 6e 74 73 20 70 72 6f |I compon|ents pro|
|00001bd0| 76 69 64 65 20 65 6e 63 | 61 70 73 75 6c 61 74 65 |vide enc|apsulate|
|00001be0| 64 20 66 75 6e 63 74 69 | 6f 6e 61 6c 69 74 79 20 |d functi|onality |
|00001bf0| 74 6f 20 74 68 65 20 75 | 73 65 72 0d 0a 69 6e 74 |to the u|ser..int|
|00001c00| 65 72 66 61 63 65 2c 20 | 67 65 6e 65 72 61 6c 6c |erface, |generall|
|00001c10| 79 20 62 79 20 69 6e 74 | 65 72 61 63 74 69 6e 67 |y by int|eracting|
|00001c20| 20 77 69 74 68 20 55 49 | 20 63 6f 6d 70 6f 6e 65 | with UI| compone|
|00001c30| 6e 74 73 2e 20 54 68 65 | 79 20 68 61 76 65 20 6e |nts. The|y have n|
|00001c40| 6f 20 61 62 69 6c 69 74 | 79 0d 0a 74 6f 20 70 61 |o abilit|y..to pa|
|00001c50| 69 6e 74 20 61 6e 79 74 | 68 69 6e 67 20 74 6f 20 |int anyt|hing to |
|00001c60| 74 68 65 20 73 63 72 65 | 65 6e 2e 20 41 74 20 64 |the scre|en. At d|
|00001c70| 65 73 69 67 6e 20 74 69 | 6d 65 2c 20 6e 6f 6e 2d |esign ti|me, non-|
|00001c80| 55 49 20 63 6f 6d 70 6f | 6e 65 6e 74 73 20 61 70 |UI compo|nents ap|
|00001c90| 70 65 61 72 0d 0a 69 6e | 20 74 68 65 20 43 6f 6d |pear..in| the Com|
|00001ca0| 70 6f 6e 65 6e 74 20 54 | 72 65 65 2c 20 72 61 74 |ponent T|ree, rat|
|00001cb0| 68 65 72 20 74 68 61 6e | 20 69 6e 20 74 68 65 20 |her than| in the |
|00001cc0| 55 49 20 44 65 73 69 67 | 6e 65 72 2e 20 55 73 65 |UI Desig|ner. Use|
|00001cd0| 72 73 20 73 65 6c 65 63 | 74 20 74 68 65 0d 0a 6e |rs selec|t the..n|
|00001ce0| 6f 6e 2d 55 49 20 63 6f | 6d 70 6f 6e 65 6e 74 20 |on-UI co|mponent |
|00001cf0| 69 6e 20 74 68 65 20 43 | 6f 6d 70 6f 6e 65 6e 74 |in the C|omponent|
|00001d00| 20 54 72 65 65 20 74 6f | 20 6d 61 6e 69 70 75 6c | Tree to| manipul|
|00001d10| 61 74 65 20 74 68 65 20 | 63 6f 6d 70 6f 6e 65 6e |ate the |componen|
|00001d20| 74 27 73 20 70 72 6f 70 | 65 72 74 69 65 73 0d 0a |t's prop|erties..|
|00001d30| 61 6e 64 20 65 76 65 6e | 74 73 2e 0d 0a 0d 0a 3c |and even|ts.....<|
|00001d40| 50 3e 54 68 65 20 3c 65 | 6d 3e 44 61 74 61 62 61 |P>The <e|m>Databa|
|00001d50| 73 65 20 3c 2f 65 6d 3e | 63 6f 6d 70 6f 6e 65 6e |se </em>|componen|
|00001d60| 74 20 69 73 20 61 6e 20 | 65 78 61 6d 70 6c 65 20 |t is an |example |
|00001d70| 6f 66 20 61 20 6e 6f 6e | 2d 55 49 20 63 6f 6d 70 |of a non|-UI comp|
|00001d80| 6f 6e 65 6e 74 2e 20 49 | 74 20 62 65 63 6f 6d 65 |onent. I|t become|
|00001d90| 73 20 61 20 70 61 72 74 | 20 6f 66 20 61 6e 20 61 |s a part| of an a|
|00001da0| 70 70 6c 69 63 61 74 69 | 6f 6e 2c 20 62 75 74 20 |pplicati|on, but |
|00001db0| 69 73 20 6e 65 76 65 72 | 20 76 69 73 69 62 6c 65 |is never| visible|
|00001dc0| 20 74 6f 20 74 68 65 20 | 75 73 65 72 20 6f 66 20 | to the |user of |
|00001dd0| 74 68 65 20 61 70 70 6c | 69 63 61 74 69 6f 6e 2e |the appl|ication.|
|00001de0| 20 54 68 65 20 3c 65 6d | 3e 44 61 74 61 62 61 73 | The <em|>Databas|
|00001df0| 65 20 3c 2f 65 6d 3e 63 | 6f 6d 70 6f 6e 65 6e 74 |e </em>c|omponent|
|00001e00| 2c 20 6c 69 6b 65 20 61 | 6c 6c 20 6e 6f 6e 2d 55 |, like a|ll non-U|
|00001e10| 49 20 63 6f 6d 70 6f 6e | 65 6e 74 73 2c 20 6e 65 |I compon|ents, ne|
|00001e20| 76 65 72 20 64 72 61 77 | 73 20 61 6e 79 74 68 69 |ver draw|s anythi|
|00001e30| 6e 67 20 6f 6e 20 74 68 | 65 20 73 63 72 65 65 6e |ng on th|e screen|
|00001e40| 2e 0d 0a 0d 0a 3c 50 3e | 57 68 65 6e 20 79 6f 75 |.....<P>|When you|
|00001e50| 20 77 6f 72 6b 20 77 69 | 74 68 20 61 20 6e 6f 6e | work wi|th a non|
|00001e60| 2d 55 49 20 63 6f 6d 70 | 6f 6e 65 6e 74 2c 20 79 |-UI comp|onent, y|
|00001e70| 6f 75 20 63 61 6e 20 64 | 72 6f 70 20 74 68 65 6d |ou can d|rop them|
|00001e80| 20 6f 6e 20 74 68 65 20 | 55 49 20 44 65 73 69 67 | on the |UI Desig|
|00001e90| 6e 65 72 20 6f 72 20 74 | 68 65 20 43 6f 6d 70 6f |ner or t|he Compo|
|00001ea0| 6e 65 6e 74 20 54 72 65 | 65 2c 20 62 75 74 20 74 |nent Tre|e, but t|
|00001eb0| 68 65 79 20 61 70 70 65 | 61 72 20 74 68 65 20 43 |hey appe|ar the C|
|00001ec0| 6f 6d 70 6f 6e 65 6e 74 | 20 54 72 65 65 20 6f 6e |omponent| Tree on|
|00001ed0| 6c 79 2c 20 6e 6f 74 20 | 6f 6e 20 74 68 65 20 55 |ly, not |on the U|
|00001ee0| 49 20 44 65 73 69 67 6e | 65 72 2e 0d 0a 0d 0a 0d |I Design|er......|
|00001ef0| 0a 0d 0a 3c 41 20 4e 41 | 4d 45 3d 22 6d 65 6e 75 |...<A NA|ME="menu|
|00001f00| 63 6f 6d 70 6f 6e 65 6e | 74 73 22 3e 3c 2f 41 3e |componen|ts"></A>|
|00001f10| 0d 0a 3c 48 34 3e 4d 65 | 6e 75 20 63 6f 6d 70 6f |..<H4>Me|nu compo|
|00001f20| 6e 65 6e 74 73 3c 2f 48 | 34 3e 0d 0a 3c 21 2d 2d |nents</H|4>..<!--|
|00001f30| 42 4e 44 58 3d 22 63 6f | 6d 70 6f 6e 65 6e 74 73 |BNDX="co|mponents|
|00001f40| 3a 6d 65 6e 75 3b 6d 65 | 6e 75 20 63 6f 6d 70 6f |:menu;me|nu compo|
|00001f50| 6e 65 6e 74 73 22 2d 2d | 3e 0d 0a 0d 0a 4d 65 6e |nents"--|>....Men|
|00001f60| 75 20 63 6f 6d 70 6f 6e | 65 6e 74 73 20 61 72 65 |u compon|ents are|
|00001f70| 20 61 20 73 70 65 63 69 | 61 6c 20 63 61 73 65 2e | a speci|al case.|
|00001f80| 20 54 68 65 79 20 61 72 | 65 20 55 49 20 63 6f 6d | They ar|e UI com|
|00001f90| 70 6f 6e 65 6e 74 73 2c | 20 62 75 74 20 74 68 65 |ponents,| but the|
|00001fa0| 79 20 61 70 70 65 61 72 | 20 6f 6e 20 74 68 65 20 |y appear| on the |
|00001fb0| 43 6f 6d 70 6f 6e 65 6e | 74 20 54 72 65 65 2c 20 |Componen|t Tree, |
|00001fc0| 6e 6f 74 20 74 68 65 20 | 55 49 20 44 65 73 69 67 |not the |UI Desig|
|00001fd0| 6e 65 72 2e 20 4f 6e 63 | 65 20 79 6f 75 20 64 72 |ner. Onc|e you dr|
|00001fe0| 6f 70 20 74 68 65 6d 20 | 69 6e 20 79 6f 75 72 20 |op them |in your |
|00001ff0| 61 70 70 6c 65 74 20 6f | 72 20 61 70 70 6c 69 63 |applet o|r applic|
|00002000| 61 74 69 6f 6e 2c 20 64 | 6f 75 62 6c 65 2d 63 6c |ation, d|ouble-cl|
|00002010| 69 63 6b 20 74 68 65 20 | 63 6f 6d 70 6f 6e 65 6e |ick the |componen|
|00002020| 74 20 69 6e 20 74 68 65 | 20 43 6f 6d 70 6f 6e 65 |t in the| Compone|
|00002030| 6e 74 20 54 72 65 65 20 | 74 6f 20 64 69 73 70 6c |nt Tree |to displ|
|00002040| 61 79 20 74 68 65 20 4d | 65 6e 75 20 44 65 73 69 |ay the M|enu Desi|
|00002050| 67 6e 65 72 2e 20 55 73 | 69 6e 67 20 74 68 65 20 |gner. Us|ing the |
|00002060| 4d 65 6e 75 20 44 65 73 | 69 67 6e 65 72 2c 20 79 |Menu Des|igner, y|
|00002070| 6f 75 20 63 61 6e 20 76 | 69 73 75 61 6c 6c 79 20 |ou can v|isually |
|00002080| 62 75 69 6c 64 20 74 68 | 65 20 6d 65 6e 75 73 20 |build th|e menus |
|00002090| 66 6f 72 20 79 6f 75 72 | 20 61 70 70 6c 69 63 61 |for your| applica|
|000020a0| 74 69 6f 6e 2e 0d 0a 0d | 0a 0d 0a 3c 41 20 4e 41 |tion....|...<A NA|
|000020b0| 4d 45 3d 22 63 6f 6d 70 | 6f 73 69 74 65 22 3e 3c |ME="comp|osite"><|
|000020c0| 2f 41 3e 0d 0a 3c 48 34 | 3e 43 6f 6d 70 6f 73 69 |/A>..<H4|>Composi|
|000020d0| 74 65 20 63 6f 6d 70 6f | 6e 65 6e 74 73 3c 2f 48 |te compo|nents</H|
|000020e0| 34 3e 0d 0a 3c 21 2d 2d | 42 4e 44 58 3d 22 63 6f |4>..<!--|BNDX="co|
|000020f0| 6d 70 6f 6e 65 6e 74 73 | 3a 63 6f 6d 70 6f 73 69 |mponents|:composi|
|00002100| 74 65 3b 63 6f 6d 70 6f | 73 69 74 65 20 63 6f 6d |te;compo|site com|
|00002110| 70 6f 6e 65 6e 74 73 22 | 2d 2d 3e 0d 0a 0d 0a 4a |ponents"|-->....J|
|00002120| 42 75 69 6c 64 65 72 27 | 73 20 4a 61 76 61 42 65 |Builder'|s JavaBe|
|00002130| 61 6e 73 20 63 6f 6e 74 | 72 6f 6c 73 20 75 73 65 |ans cont|rols use|
|00002140| 20 61 20 3c 41 20 48 52 | 45 46 3d 22 6d 76 69 61 | a <A HR|EF="mvia|
|00002150| 72 63 68 2e 68 74 6d 6c | 22 3e 6d 6f 64 65 6c 2d |rch.html|">model-|
|00002160| 76 69 65 77 20 61 72 63 | 68 69 74 65 63 74 75 72 |view arc|hitectur|
|00002170| 65 3c 2f 41 3e 2e 20 42 | 65 73 69 64 65 73 20 74 |e</A>. B|esides t|
|00002180| 68 65 20 63 6f 6e 74 72 | 6f 6c 73 20 72 65 70 72 |he contr|ols repr|
|00002190| 65 73 65 6e 74 65 64 20 | 6f 6e 20 74 68 65 20 4a |esented |on the J|
|000021a0| 42 75 69 6c 64 65 72 20 | 43 6f 6d 70 6f 6e 65 6e |Builder |Componen|
|000021b0| 74 20 50 61 6c 65 74 74 | 65 2c 20 4a 42 43 4c 20 |t Palett|e, JBCL |
|000021c0| 70 72 6f 76 69 64 65 73 | 20 61 20 63 6f 6c 6c 65 |provides| a colle|
|000021d0| 63 74 69 6f 6e 20 6f 66 | 20 3c 65 6d 3e 6d 6f 64 |ction of| <em>mod|
|000021e0| 65 6c 73 20 3c 2f 65 6d | 3e 28 64 61 74 61 20 63 |els </em|>(data c|
|000021f0| 6f 6e 74 61 69 6e 65 72 | 73 29 2c 20 3c 65 6d 3e |ontainer|s), <em>|
|00002200| 76 69 65 77 73 20 3c 2f | 65 6d 3e 28 74 68 65 20 |views </|em>(the |
|00002210| 63 6f 72 65 20 6f 66 20 | 63 6f 6d 70 6f 73 69 74 |core of |composit|
|00002220| 65 20 63 6f 6d 70 6f 6e | 65 6e 74 73 29 2c 20 3c |e compon|ents), <|
|00002230| 65 6d 3e 69 74 65 6d 20 | 70 61 69 6e 74 65 72 73 |em>item |painters|
|00002240| 3c 2f 65 6d 3e 20 28 6f | 62 6a 65 63 74 73 20 74 |</em> (o|bjects t|
|00002250| 68 61 74 20 64 69 73 70 | 6c 61 79 20 74 68 65 20 |hat disp|lay the |
|00002260| 64 61 74 61 29 2c 20 3c | 65 6d 3e 69 74 65 6d 20 |data), <|em>item |
|00002270| 65 64 69 74 6f 72 73 3c | 2f 65 6d 3e 20 28 6f 62 |editors<|/em> (ob|
|00002280| 6a 65 63 74 73 20 74 68 | 61 74 20 70 65 72 6d 69 |jects th|at permi|
|00002290| 74 20 64 61 74 61 20 76 | 61 6c 75 65 73 20 74 6f |t data v|alues to|
|000022a0| 20 62 65 20 63 68 61 6e | 67 65 64 29 2c 20 61 6e | be chan|ged), an|
|000022b0| 64 20 3c 65 6d 3e 76 69 | 65 77 20 6d 61 6e 61 67 |d <em>vi|ew manag|
|000022c0| 65 72 73 3c 2f 65 6d 3e | 20 28 6f 62 6a 65 63 74 |ers</em>| (object|
|000022d0| 73 20 74 68 61 74 20 73 | 65 6c 65 63 74 20 69 74 |s that s|elect it|
|000022e0| 65 6d 20 70 61 69 6e 74 | 65 72 73 20 61 6e 64 20 |em paint|ers and |
|000022f0| 65 64 69 74 6f 72 73 29 | 2e 20 20 59 6f 75 20 63 |editors)|. You c|
|00002300| 61 6e 20 75 73 65 20 74 | 68 65 6d 20 69 6e 20 62 |an use t|hem in b|
|00002310| 75 69 6c 64 69 6e 67 20 | 79 6f 75 72 20 6f 77 6e |uilding |your own|
|00002320| 20 63 6f 6d 70 6f 6e 65 | 6e 74 73 2e 0d 0a 0d 0a | compone|nts.....|
|00002330| 3c 70 3e 54 68 65 20 70 | 75 72 70 6f 73 65 20 6f |<p>The p|urpose o|
|00002340| 66 20 74 68 65 20 6d 6f | 64 65 6c 2d 76 69 65 77 |f the mo|del-view|
|00002350| 20 61 72 63 68 69 74 65 | 63 74 75 72 65 20 69 73 | archite|cture is|
|00002360| 20 74 6f 20 73 65 70 61 | 72 61 74 65 20 74 68 65 | to sepa|rate the|
|00002370| 20 72 65 70 72 65 73 65 | 6e 74 61 74 69 6f 6e 20 | represe|ntation |
|00002380| 6f 66 20 64 61 74 61 20 | 66 72 6f 6d 20 74 68 65 |of data |from the|
|00002390| 20 6d 6f 64 65 6c 20 69 | 74 73 65 6c 66 20 61 6e | model i|tself an|
|000023a0| 64 20 61 6c 6c 6f 77 20 | 66 6f 72 20 6d 75 6c 74 |d allow |for mult|
|000023b0| 69 70 6c 65 20 76 69 65 | 77 73 20 6f 66 20 74 68 |iple vie|ws of th|
|000023c0| 65 20 73 61 6d 65 20 64 | 61 74 61 2e 0d 0a 43 6f |e same d|ata...Co|
|000023d0| 6d 70 6f 6e 65 6e 74 73 | 20 74 68 61 74 20 69 6e |mponents| that in|
|000023e0| 73 74 61 6e 74 69 61 74 | 65 20 74 68 65 73 65 20 |stantiat|e these |
|000023f0| 6d 6f 64 65 6c 2d 76 69 | 65 77 20 63 6c 61 73 73 |model-vi|ew class|
|00002400| 65 73 20 74 6f 20 70 65 | 72 66 6f 72 6d 20 74 68 |es to pe|rform th|
|00002410| 65 69 72 20 77 6f 72 6b | 0d 0a 61 72 65 20 6f 66 |eir work|..are of|
|00002420| 74 65 6e 20 72 65 66 65 | 72 72 65 64 20 74 6f 20 |ten refe|rred to |
|00002430| 61 73 20 3c 65 6d 3e 63 | 6f 6d 70 6f 73 69 74 65 |as <em>c|omposite|
|00002440| 20 3c 2f 65 6d 3e 63 6f | 6d 70 6f 6e 65 6e 74 73 | </em>co|mponents|
|00002450| 2e 20 4d 6f 73 74 20 6f | 66 20 4a 42 75 69 6c 64 |. Most o|f JBuild|
|00002460| 65 72 27 73 0d 0a 63 6f | 6e 74 72 6f 6c 73 20 61 |er's..co|ntrols a|
|00002470| 72 65 20 63 6f 6d 70 6f | 73 69 74 65 20 63 6f 6d |re compo|site com|
|00002480| 70 6f 6e 65 6e 74 73 2e | 0d 0a 0d 0a 0d 0a 3c 41 |ponents.|......<A|
|00002490| 20 4e 41 4d 45 3d 22 63 | 6f 6e 74 72 6f 6c 73 22 | NAME="c|ontrols"|
|000024a0| 3e 3c 2f 41 3e 0d 0a 3c | 48 34 3e 43 6f 6e 74 72 |></A>..<|H4>Contr|
|000024b0| 6f 6c 73 3c 2f 48 34 3e | 0d 0a 3c 21 2d 2d 42 4e |ols</H4>|..<!--BN|
|000024c0| 44 58 3d 22 63 6f 6e 74 | 72 6f 6c 73 3b 55 49 20 |DX="cont|rols;UI |
|000024d0| 63 6f 6d 70 6f 6e 65 6e | 74 73 3a 63 6f 6e 74 72 |componen|ts:contr|
|000024e0| 6f 6c 73 20 61 73 22 2d | 2d 3e 0d 0a 0d 0a 55 49 |ols as"-|->....UI|
|000024f0| 20 63 6f 6d 70 6f 6e 65 | 6e 74 73 20 61 72 65 20 | compone|nts are |
|00002500| 6f 66 74 65 6e 20 72 65 | 66 65 72 72 65 64 20 74 |often re|ferred t|
|00002510| 6f 20 61 73 20 3c 65 6d | 3e 63 6f 6e 74 72 6f 6c |o as <em|>control|
|00002520| 73 3c 2f 65 6d 3e 2e 20 | 49 6e 20 66 61 63 74 2c |s</em>. |In fact,|
|00002530| 20 6f 6e 20 4a 42 75 69 | 6c 64 65 72 27 73 20 43 | on JBui|lder's C|
|00002540| 6f 6d 70 6f 6e 65 6e 74 | 20 50 61 6c 65 74 74 65 |omponent| Palette|
|00002550| 20 69 73 20 61 20 74 61 | 62 20 6c 61 62 65 6c 65 | is a ta|b labele|
|00002560| 64 20 22 43 6f 6e 74 72 | 6f 6c 73 22 2e 20 54 68 |d "Contr|ols". Th|
|00002570| 65 73 65 20 63 6f 6e 74 | 72 6f 6c 73 20 61 72 65 |ese cont|rols are|
|00002580| 20 63 6f 6d 70 6c 65 74 | 65 20 55 49 20 63 6f 6d | complet|e UI com|
|00002590| 70 6f 6e 65 6e 74 73 2c | 20 61 62 6c 65 20 74 6f |ponents,| able to|
|000025a0| 20 62 65 63 6f 6d 65 20 | 70 61 72 74 20 6f 66 20 | become |part of |
|000025b0| 74 68 65 20 75 73 65 72 | 20 69 6e 74 65 72 66 61 |the user| interfa|
|000025c0| 63 65 20 6f 66 20 61 6e | 20 61 70 70 6c 69 63 61 |ce of an| applica|
|000025d0| 74 69 6f 6e 2e 20 0d 0a | 0d 0a 3c 70 3e 53 6f 6d |tion. ..|..<p>Som|
|000025e0| 65 20 6f 66 20 4a 42 75 | 69 6c 64 65 72 27 73 20 |e of JBu|ilder's |
|000025f0| 73 74 61 6e 64 61 72 64 | 20 63 6f 6d 70 6f 6e 65 |standard| compone|
|00002600| 6e 74 73 20 68 61 76 65 | 20 74 68 65 20 74 65 72 |nts have| the ter|
|00002610| 6d 20 22 63 6f 6e 74 72 | 6f 6c 22 20 61 73 20 61 |m "contr|ol" as a|
|00002620| 20 70 61 72 74 20 6f 66 | 20 74 68 65 69 72 20 6e | part of| their n|
|00002630| 61 6d 65 73 20 28 66 6f | 72 20 65 78 61 6d 70 6c |ames (fo|r exampl|
|00002640| 65 2c 20 3c 65 6d 3e 54 | 72 65 65 43 6f 6e 74 72 |e, <em>T|reeContr|
|00002650| 6f 6c 3c 2f 65 6d 3e 20 | 69 6e 20 3c 65 6d 3e 62 |ol</em> |in <em>b|
|00002660| 6f 72 6c 61 6e 64 2e 6a | 62 63 6c 2e 63 6f 6e 74 |orland.j|bcl.cont|
|00002670| 72 6f 6c 3c 2f 65 6d 3e | 29 2e 20 54 68 65 73 65 |rol</em>|). These|
|00002680| 20 63 6f 6d 70 6f 73 69 | 74 65 20 63 6f 6d 70 6f | composi|te compo|
|00002690| 6e 65 6e 74 73 20 61 72 | 65 20 73 6f 20 6e 61 6d |nents ar|e so nam|
|000026a0| 65 64 20 74 6f 20 64 69 | 73 74 69 6e 67 75 69 73 |ed to di|stinguis|
|000026b0| 68 20 74 68 65 6d 20 66 | 72 6f 6d 20 74 68 65 20 |h them f|rom the |
|000026c0| 6d 6f 64 65 6c 2d 76 69 | 65 77 20 63 6c 61 73 73 |model-vi|ew class|
|000026d0| 65 73 20 74 68 61 74 20 | 68 61 76 65 20 73 69 6d |es that |have sim|
|000026e0| 69 6c 61 72 20 6e 61 6d | 65 73 2e 20 49 6e 20 6d |ilar nam|es. In m|
|000026f0| 6f 73 74 20 63 61 73 65 | 73 2c 20 74 68 65 20 63 |ost case|s, the c|
|00002700| 6c 61 73 73 20 77 69 74 | 68 20 22 63 6f 6e 74 72 |lass wit|h "contr|
|00002710| 6f 6c 22 20 69 6e 20 69 | 74 73 0d 0a 6e 61 6d 65 |ol" in i|ts..name|
|00002720| 20 69 73 20 74 68 65 20 | 63 6f 6d 70 6c 65 74 65 | is the |complete|
|00002730| 20 63 6f 6d 70 6f 6e 65 | 6e 74 20 74 68 61 74 20 | compone|nt that |
|00002740| 63 61 6e 20 62 65 20 75 | 73 65 64 20 74 6f 20 64 |can be u|sed to d|
|00002750| 65 73 69 67 6e 20 76 69 | 73 75 61 6c 6c 79 2c 20 |esign vi|sually, |
|00002760| 61 6e 64 0d 0a 77 68 69 | 63 68 20 68 61 73 20 62 |and..whi|ch has b|
|00002770| 65 65 6e 20 64 65 76 65 | 6c 6f 70 65 64 20 66 72 |een deve|loped fr|
|00002780| 6f 6d 20 74 68 65 20 76 | 69 65 77 20 63 6f 6d 70 |om the v|iew comp|
|00002790| 6f 6e 65 6e 74 20 6f 66 | 20 74 68 65 20 73 61 6d |onent of| the sam|
|000027a0| 65 20 6e 61 6d 65 2e 20 | 54 68 65 0d 0a 22 76 69 |e name. |The.."vi|
|000027b0| 65 77 22 20 69 73 20 74 | 68 65 20 63 6f 72 72 65 |ew" is t|he corre|
|000027c0| 73 70 6f 6e 64 69 6e 67 | 20 76 69 65 77 20 63 6c |sponding| view cl|
|000027d0| 61 73 73 20 6f 66 20 74 | 68 65 20 63 6f 6e 74 72 |ass of t|he contr|
|000027e0| 6f 6c 2c 20 61 6e 64 20 | 69 74 20 69 73 20 75 73 |ol, and |it is us|
|000027f0| 65 64 20 66 6f 72 0d 0a | 64 65 76 65 6c 6f 70 69 |ed for..|developi|
|00002800| 6e 67 20 6f 72 69 67 69 | 6e 61 6c 20 63 6f 6d 70 |ng origi|nal comp|
|00002810| 6f 73 69 74 65 20 63 6f | 6d 70 6f 6e 65 6e 74 73 |osite co|mponents|
|00002820| 2e 20 46 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 74 |. For ex|ample, t|
|00002830| 68 65 20 3c 65 6d 3e 54 | 72 65 65 43 6f 6e 74 72 |he <em>T|reeContr|
|00002840| 6f 6c 3c 2f 65 6d 3e 20 | 69 73 20 62 61 73 65 64 |ol</em> |is based|
|00002850| 20 6f 6e 20 74 68 65 20 | 3c 65 6d 3e 54 72 65 65 | on the |<em>Tree|
|00002860| 56 69 65 77 20 3c 2f 65 | 6d 3e 63 6c 61 73 73 2e |View </e|m>class.|
|00002870| 0d 0a 0d 0a 3c 50 3e 3c | 21 2d 2d 42 56 48 2d 2d |....<P><|!--BVH--|
|00002880| 3e 3c 73 74 72 6f 6e 67 | 3e 53 65 65 20 61 6c 73 |><strong|>See als|
|00002890| 6f 3a 3c 21 2d 2d 2f 42 | 56 48 2d 2d 3e 3c 2f 73 |o:<!--/B|VH--></s|
|000028a0| 74 72 6f 6e 67 3e 0d 0a | 3c 42 52 3e 3c 41 20 48 |trong>..|<BR><A H|
|000028b0| 52 45 46 3d 22 6f 76 65 | 72 76 69 65 77 2e 68 74 |REF="ove|rview.ht|
|000028c0| 6d 6c 22 3e 4f 76 65 72 | 76 69 65 77 20 6f 66 20 |ml">Over|view of |
|000028d0| 63 6f 6d 70 6f 6e 65 6e | 74 20 77 72 69 74 69 6e |componen|t writin|
|000028e0| 67 3c 2f 41 3e 0d 0a 3c | 42 52 3e 3c 41 20 48 52 |g</A>..<|BR><A HR|
|000028f0| 45 46 3d 22 6d 76 69 61 | 72 63 68 2e 68 74 6d 6c |EF="mvia|rch.html|
|00002900| 22 3e 55 6e 64 65 72 73 | 74 61 6e 64 69 6e 67 20 |">Unders|tanding |
|00002910| 6d 6f 64 65 6c 2d 76 69 | 65 77 20 61 72 63 68 69 |model-vi|ew archi|
|00002920| 74 65 63 74 75 72 65 3c | 2f 41 3e 0d 0a 0d 0a 3c |tecture<|/A>....<|
|00002930| 50 3e 0d 0a 3c 48 52 3e | 3c 21 2d 2d 2a 2a 2a 2a |P>..<HR>|<!--****|
|00002940| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 4a |********|*******J|
|00002950| 61 76 61 42 65 61 6e 53 | 20 43 4f 4d 50 4f 4e 45 |avaBeanS| COMPONE|
|00002960| 4e 54 20 4d 4f 44 45 4c | 2a 2a 2a 2a 2a 2a 2a 2a |NT MODEL|********|
|00002970| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2d 2d 3e 0d 0a |********|***-->..|
|00002980| 3c 41 20 4e 41 4d 45 3d | 22 6a 61 76 61 62 65 61 |<A NAME=|"javabea|
|00002990| 6e 73 72 65 71 75 69 72 | 65 6d 65 6e 74 73 22 3e |nsrequir|ements">|
|000029a0| 3c 2f 41 3e 0d 0a 3c 48 | 32 3e 54 68 65 20 72 65 |</A>..<H|2>The re|
|000029b0| 71 75 69 72 65 6d 65 6e | 74 73 20 6f 66 20 74 68 |quiremen|ts of th|
|000029c0| 65 20 4a 61 76 61 42 65 | 61 6e 73 20 63 6f 6d 70 |e JavaBe|ans comp|
|000029d0| 6f 6e 65 6e 74 20 6d 6f | 64 65 6c 3c 2f 48 32 3e |onent mo|del</H2>|
|000029e0| 0d 0a 3c 21 2d 2d 42 4e | 44 58 3d 22 63 6f 6d 70 |..<!--BN|DX="comp|
|000029f0| 6f 6e 65 6e 74 20 6d 6f | 64 65 6c 3b 63 6f 6d 70 |onent mo|del;comp|
|00002a00| 6f 6e 65 6e 74 73 3a 4a | 61 76 61 42 65 61 6e 73 |onents:J|avaBeans|
|00002a10| 20 6d 6f 64 65 6c 3b 4a | 61 76 61 42 65 61 6e 73 | model;J|avaBeans|
|00002a20| 3b 63 6f 6d 70 6f 6e 65 | 6e 74 20 77 72 69 74 69 |;compone|nt writi|
|00002a30| 6e 67 3a 6f 76 65 72 76 | 69 65 77 22 2d 2d 3e 0d |ng:overv|iew"-->.|
|00002a40| 0a 0d 0a 54 68 65 20 4a | 61 76 61 42 65 61 6e 73 |...The J|avaBeans|
|00002a50| 20 63 6f 6d 70 6f 6e 65 | 6e 74 20 6d 6f 64 65 6c | compone|nt model|
|00002a60| 20 73 70 65 63 69 66 69 | 63 61 74 69 6f 6e 20 77 | specifi|cation w|
|00002a70| 61 73 20 64 65 76 65 6c | 6f 70 65 64 20 61 73 20 |as devel|oped as |
|00002a80| 61 20 63 6f 6f 72 64 69 | 6e 61 74 65 64 20 65 66 |a coordi|nated ef|
|00002a90| 66 6f 72 74 20 62 65 74 | 77 65 65 6e 20 42 6f 72 |fort bet|ween Bor|
|00002aa0| 6c 61 6e 64 2c 20 53 75 | 6e 2c 20 61 6e 64 20 6f |land, Su|n, and o|
|00002ab0| 74 68 65 72 73 20 74 6f | 20 65 73 74 61 62 6c 69 |thers to| establi|
|00002ac0| 73 68 20 61 20 70 6c 61 | 74 66 6f 72 6d 2d 6e 65 |sh a pla|tform-ne|
|00002ad0| 75 74 72 61 6c 0d 0a 63 | 6f 6d 70 6f 6e 65 6e 74 |utral..c|omponent|
|00002ae0| 20 6d 6f 64 65 6c 20 41 | 50 49 2e 20 4a 42 75 69 | model A|PI. JBui|
|00002af0| 6c 64 65 72 20 72 65 63 | 6f 67 6e 69 7a 65 73 20 |lder rec|ognizes |
|00002b00| 63 6f 6d 70 6f 6e 65 6e | 74 73 20 74 68 61 74 20 |componen|ts that |
|00002b10| 63 6f 6e 66 6f 72 6d 20 | 74 6f 20 74 68 65 0d 0a |conform |to the..|
|00002b20| 4a 61 76 61 42 65 61 6e | 73 20 73 70 65 63 69 66 |JavaBean|s specif|
|00002b30| 69 63 61 74 69 6f 6e 20 | 61 6e 64 20 69 6e 63 6f |ication |and inco|
|00002b40| 72 70 6f 72 61 74 65 73 | 20 74 68 65 6d 20 69 6e |rporates| them in|
|00002b50| 74 6f 20 69 74 73 20 69 | 6e 74 65 67 72 61 74 65 |to its i|ntegrate|
|00002b60| 64 0d 0a 64 65 76 65 6c | 6f 70 6d 65 6e 74 20 65 |d..devel|opment e|
|00002b70| 6e 76 69 72 6f 6e 6d 65 | 6e 74 2e 20 54 6f 20 65 |nvironme|nt. To e|
|00002b80| 66 66 65 63 74 69 76 65 | 6c 79 20 63 72 65 61 74 |ffective|ly creat|
|00002b90| 65 20 4a 61 76 61 42 65 | 61 6e 73 20 63 6f 6d 70 |e JavaBe|ans comp|
|00002ba0| 6f 6e 65 6e 74 73 20 77 | 69 74 68 69 6e 0d 0a 4a |onents w|ithin..J|
|00002bb0| 42 75 69 6c 64 65 72 27 | 73 20 65 6e 76 69 72 6f |Builder'|s enviro|
|00002bc0| 6e 6d 65 6e 74 2c 20 79 | 6f 75 20 6d 75 73 74 20 |nment, y|ou must |
|00002bd0| 75 6e 64 65 72 73 74 61 | 6e 64 20 68 6f 77 20 63 |understa|nd how c|
|00002be0| 6f 6d 70 6f 6e 65 6e 74 | 73 20 63 6f 6e 66 6f 72 |omponent|s confor|
|00002bf0| 6d 20 74 6f 20 61 6e 64 | 0d 0a 63 61 6e 20 65 78 |m to and|..can ex|
|00002c00| 74 65 6e 64 20 74 68 65 | 20 4a 61 76 61 42 65 61 |tend the| JavaBea|
|00002c10| 6e 73 20 73 70 65 63 69 | 66 69 63 61 74 69 6f 6e |ns speci|fication|
|00002c20| 2e 0d 0a 0d 0a 3c 50 3e | 54 68 65 20 4a 61 76 61 |.....<P>|The Java|
|00002c30| 42 65 61 6e 73 20 63 6f | 6d 70 6f 6e 65 6e 74 20 |Beans co|mponent |
|00002c40| 6d 6f 64 65 6c 20 69 73 | 20 61 20 73 70 65 63 69 |model is| a speci|
|00002c50| 66 69 63 61 74 69 6f 6e | 20 66 6f 72 20 68 6f 77 |fication| for how|
|00002c60| 20 74 6f 20 63 6f 64 65 | 20 63 6f 6d 70 6f 6e 65 | to code| compone|
|00002c70| 6e 74 73 2e 20 43 6f 6d | 70 6f 6e 65 6e 74 73 20 |nts. Com|ponents |
|00002c80| 74 68 61 74 20 63 6f 6d | 70 6c 79 20 77 69 74 68 |that com|ply with|
|00002c90| 20 74 68 69 73 20 73 70 | 65 63 69 66 69 63 61 74 | this sp|ecificat|
|00002ca0| 69 6f 6e 20 77 6f 72 6b | 20 69 6e 20 4a 42 75 69 |ion work| in JBui|
|00002cb0| 6c 64 65 72 27 73 20 76 | 69 73 75 61 6c 20 65 6e |lder's v|isual en|
|00002cc0| 76 69 72 6f 6e 6d 65 6e | 74 2e 20 4a 42 75 69 6c |vironmen|t. JBuil|
|00002cd0| 64 65 72 20 70 61 72 73 | 65 73 20 74 68 65 20 63 |der pars|es the c|
|00002ce0| 6f 6d 70 6f 6e 65 6e 74 | 20 63 6f 64 65 20 61 6e |omponent| code an|
|00002cf0| 64 20 6d 61 6b 65 73 20 | 69 74 73 20 70 72 6f 70 |d makes |its prop|
|00002d00| 65 72 74 69 65 73 20 61 | 6e 64 20 65 76 65 6e 74 |erties a|nd event|
|00002d10| 73 20 61 76 61 69 6c 61 | 62 6c 65 20 69 6e 20 74 |s availa|ble in t|
|00002d20| 68 65 20 43 6f 6d 70 6f | 6e 65 6e 74 20 49 6e 73 |he Compo|nent Ins|
|00002d30| 70 65 63 74 6f 72 2e 20 | 54 68 65 20 63 6f 6d 70 |pector. |The comp|
|00002d40| 6c 65 74 65 20 63 6f 6d | 70 6f 6e 65 6e 74 20 6d |lete com|ponent m|
|00002d50| 6f 64 65 6c 20 73 70 65 | 63 69 66 69 63 61 74 69 |odel spe|cificati|
|00002d60| 6f 6e 20 69 73 20 61 76 | 61 69 6c 61 62 6c 65 20 |on is av|ailable |
|00002d70| 69 6e 20 74 68 65 20 4a | 61 76 61 42 65 61 6e 73 |in the J|avaBeans|
|00002d80| 20 73 70 65 63 69 66 69 | 63 61 74 69 6f 6e 20 61 | specifi|cation a|
|00002d90| 74 0d 0a 68 74 74 70 3a | 2f 2f 73 70 6c 61 73 68 |t..http:|//splash|
|00002da0| 2e 6a 61 76 61 73 6f 66 | 74 2e 63 6f 6d 2f 62 65 |.javasof|t.com/be|
|00002db0| 61 6e 73 2f 2e 0d 0a 0d | 0a 3c 50 3e 54 68 65 20 |ans/....|.<P>The |
|00002dc0| 66 6f 6c 6c 6f 77 69 6e | 67 20 61 72 65 20 74 68 |followin|g are th|
|00002dd0| 65 20 6d 6f 73 74 20 73 | 69 67 6e 69 66 69 63 61 |e most s|ignifica|
|00002de0| 6e 74 20 72 65 71 75 69 | 72 65 6d 65 6e 74 73 20 |nt requi|rements |
|00002df0| 66 6f 72 20 63 6f 6d 70 | 6f 6e 65 6e 74 73 3a 3c |for comp|onents:<|
|00002e00| 70 3e 0d 0a 3c 55 4c 3e | 0d 0a 3c 4c 49 3e 0d 0a |p>..<UL>|..<LI>..|
|00002e10| 41 20 4a 61 76 61 20 63 | 6f 6d 70 6f 6e 65 6e 74 |A Java c|omponent|
|00002e20| 20 6d 75 73 74 20 62 65 | 20 61 20 3c 73 74 72 6f | must be| a <stro|
|00002e30| 6e 67 3e 70 75 62 6c 69 | 63 3c 2f 73 74 72 6f 6e |ng>publi|c</stron|
|00002e40| 67 3e 20 63 6c 61 73 73 | 2e 3c 2f 4c 49 3e 0d 0a |g> class|.</LI>..|
|00002e50| 0d 0a 0d 0a 3c 50 3e 0d | 0a 3c 4c 49 3e 0d 0a 41 |....<P>.|.<LI>..A|
|00002e60| 20 4a 61 76 61 20 63 6f | 6d 70 6f 6e 65 6e 74 20 | Java co|mponent |
|00002e70| 6d 75 73 74 20 68 61 76 | 65 20 61 20 3c 73 74 72 |must hav|e a <str|
|00002e80| 6f 6e 67 3e 70 75 62 6c | 69 63 3c 2f 73 74 72 6f |ong>publ|ic</stro|
|00002e90| 6e 67 3e 20 63 6f 6e 73 | 74 72 75 63 74 6f 72 20 |ng> cons|tructor |
|00002ea0| 28 6f 6e 65 20 74 68 61 | 74 0d 0a 74 61 6b 65 73 |(one tha|t..takes|
|00002eb0| 20 6e 6f 20 61 72 67 75 | 6d 65 6e 74 73 29 2c 20 | no argu|ments), |
|00002ec0| 74 68 6f 75 67 68 20 69 | 74 20 63 61 6e 20 68 61 |though i|t can ha|
|00002ed0| 76 65 20 6f 74 68 65 72 | 20 63 6f 6e 73 74 72 75 |ve other| constru|
|00002ee0| 63 74 6f 72 73 2c 20 69 | 66 20 6e 65 65 64 65 64 |ctors, i|f needed|
|00002ef0| 2e 0d 0a 46 6f 72 20 65 | 78 61 6d 70 6c 65 2c 20 |...For e|xample, |
|00002f00| 61 20 63 6f 6d 70 6f 6e | 65 6e 74 20 63 61 6c 6c |a compon|ent call|
|00002f10| 65 64 20 3c 65 6d 3e 46 | 74 70 52 65 71 75 65 73 |ed <em>F|tpReques|
|00002f20| 74 44 69 61 6c 6f 67 3c | 2f 65 6d 3e 20 6d 75 73 |tDialog<|/em> mus|
|00002f30| 74 20 68 61 76 65 20 61 | 20 63 6f 6e 73 74 72 75 |t have a| constru|
|00002f40| 63 74 6f 72 0d 0a 77 69 | 74 68 20 74 68 65 20 73 |ctor..wi|th the s|
|00002f50| 69 67 6e 61 74 75 72 65 | 3a 3c 2f 4c 49 3e 0d 0a |ignature|:</LI>..|
|00002f60| 0d 0a 3c 50 52 45 3e 0d | 0a 3c 73 74 72 6f 6e 67 |..<PRE>.|.<strong|
|00002f70| 3e 70 75 62 6c 69 63 3c | 2f 73 74 72 6f 6e 67 3e |>public<|/strong>|
|00002f80| 20 46 74 70 52 65 71 75 | 65 73 74 44 69 61 6c 6f | FtpRequ|estDialo|
|00002f90| 67 28 29 3b 0d 0a 3c 2f | 50 52 45 3e 0d 0a 0d 0a |g();..</|PRE>....|
|00002fa0| 3c 4c 49 3e 0d 0a 41 20 | 4a 61 76 61 20 63 6f 6d |<LI>..A |Java com|
|00002fb0| 70 6f 6e 65 6e 74 20 75 | 73 75 61 6c 6c 79 20 68 |ponent u|sually h|
|00002fc0| 61 73 20 3c 41 20 48 52 | 45 46 3d 22 23 63 6f 6d |as <A HR|EF="#com|
|00002fd0| 70 6f 6e 65 6e 74 70 72 | 6f 70 65 72 74 69 65 73 |ponentpr|operties|
|00002fe0| 22 3e 70 72 6f 70 65 72 | 74 69 65 73 3c 2f 41 3e |">proper|ties</A>|
|00002ff0| 2c 0d 0a 77 68 69 63 68 | 20 68 61 76 65 20 3c 73 |,..which| have <s|
|00003000| 74 72 6f 6e 67 3e 70 75 | 62 6c 69 63 20 3c 2f 73 |trong>pu|blic </s|
|00003010| 74 72 6f 6e 67 3e 61 63 | 63 65 73 73 6f 72 20 6d |trong>ac|cessor m|
|00003020| 65 74 68 6f 64 73 20 66 | 6f 72 20 72 65 61 64 69 |ethods f|or readi|
|00003030| 6e 67 20 61 6e 64 20 77 | 72 69 74 69 6e 67 20 70 |ng and w|riting p|
|00003040| 72 6f 70 65 72 74 79 0d | 0a 76 61 6c 75 65 73 2e |roperty.|.values.|
|00003050| 20 54 68 65 73 65 20 6d | 65 74 68 6f 64 73 20 6d | These m|ethods m|
|00003060| 75 73 74 20 63 6f 6d 70 | 6c 79 20 77 69 74 68 20 |ust comp|ly with |
|00003070| 74 68 65 20 4a 61 76 61 | 42 65 61 6e 73 20 6e 61 |the Java|Beans na|
|00003080| 6d 69 6e 67 20 70 61 74 | 74 65 72 6e 73 2c 20 62 |ming pat|terns, b|
|00003090| 65 69 6e 67 0d 0a 6e 61 | 6d 65 64 20 3c 65 6d 3e |eing..na|med <em>|
|000030a0| 67 65 74 26 6c 74 3b 50 | 72 6f 70 65 72 74 79 4e |get&lt;P|ropertyN|
|000030b0| 61 6d 65 26 67 74 3b 28 | 29 3c 2f 65 6d 3e 20 61 |ame&gt;(|)</em> a|
|000030c0| 6e 64 20 3c 65 6d 3e 73 | 65 74 26 6c 74 3b 50 72 |nd <em>s|et&lt;Pr|
|000030d0| 6f 70 65 72 74 79 4e 61 | 6d 65 26 67 74 3b 28 29 |opertyNa|me&gt;()|
|000030e0| 3c 2f 65 6d 3e 2e 0d 0a | 42 6f 6f 6c 65 61 6e 20 |</em>...|Boolean |
|000030f0| 70 72 6f 70 65 72 74 69 | 65 73 20 73 68 6f 75 6c |properti|es shoul|
|00003100| 64 20 75 73 65 20 3c 65 | 6d 3e 69 73 26 6c 74 3b |d use <e|m>is&lt;|
|00003110| 50 72 6f 70 65 72 74 79 | 4e 61 6d 65 26 67 74 3b |Property|Name&gt;|
|00003120| 28 29 3c 2f 65 6d 3e 20 | 66 6f 72 20 74 68 65 20 |()</em> |for the |
|00003130| 72 65 61 64 0d 0a 6d 65 | 74 68 6f 64 2e 3c 2f 4c |read..me|thod.</L|
|00003140| 49 3e 0d 0a 0d 0a 0d 0a | 3c 50 3e 50 72 6f 70 65 |I>......|<P>Prope|
|00003150| 72 74 79 20 61 63 63 65 | 73 73 6f 72 20 6d 65 74 |rty acce|ssor met|
|00003160| 68 6f 64 73 20 6d 75 73 | 74 20 68 61 76 65 20 61 |hods mus|t have a|
|00003170| 20 73 70 65 63 69 66 69 | 63 20 73 69 67 6e 61 74 | specifi|c signat|
|00003180| 75 72 65 2e 20 54 68 65 | 20 72 65 61 64 20 6d 65 |ure. The| read me|
|00003190| 74 68 6f 64 20 6d 75 73 | 74 20 74 61 6b 65 20 6e |thod mus|t take n|
|000031a0| 6f 20 70 61 72 61 6d 65 | 74 65 72 73 20 61 6e 64 |o parame|ters and|
|000031b0| 20 72 65 74 75 72 6e 20 | 61 6e 20 6f 62 6a 65 63 | return |an objec|
|000031c0| 74 20 6f 66 20 74 68 65 | 20 74 79 70 65 20 69 64 |t of the| type id|
|000031d0| 65 6e 74 69 63 61 6c 0d | 0a 74 6f 20 74 68 65 20 |entical.|.to the |
|000031e0| 70 72 6f 70 65 72 74 79 | 20 74 79 70 65 2e 20 46 |property| type. F|
|000031f0| 6f 72 20 3c 73 74 72 6f | 6e 67 3e 62 6f 6f 6c 65 |or <stro|ng>boole|
|00003200| 61 6e 20 3c 2f 73 74 72 | 6f 6e 67 3e 70 72 6f 70 |an </str|ong>prop|
|00003210| 65 72 74 69 65 73 20 74 | 68 65 20 72 65 61 64 20 |erties t|he read |
|00003220| 6d 65 74 68 6f 64 20 62 | 65 67 69 6e 73 20 77 69 |method b|egins wi|
|00003230| 74 68 20 74 68 65 20 77 | 6f 72 64 20 22 69 73 22 |th the w|ord "is"|
|00003240| 3b 20 66 6f 72 20 61 6c | 6c 20 6f 74 68 65 72 20 |; for al|l other |
|00003250| 70 72 6f 70 65 72 74 69 | 65 73 20 74 68 65 20 72 |properti|es the r|
|00003260| 65 61 64 20 6d 65 74 68 | 6f 64 20 62 65 67 69 6e |ead meth|od begin|
|00003270| 73 20 77 69 74 68 20 74 | 68 65 20 77 6f 72 64 20 |s with t|he word |
|00003280| 22 67 65 74 22 2e 0d 0a | 0d 0a 3c 70 3e 54 68 65 |"get"...|..<p>The|
|00003290| 20 77 72 69 74 65 20 28 | 6f 72 20 73 65 74 29 20 | write (|or set) |
|000032a0| 6d 65 74 68 6f 64 20 6d | 75 73 74 20 74 61 6b 65 |method m|ust take|
|000032b0| 20 61 20 73 69 6e 67 6c | 65 20 70 61 72 61 6d 65 | a singl|e parame|
|000032c0| 74 65 72 0d 0a 69 64 65 | 6e 74 69 63 61 6c 20 74 |ter..ide|ntical t|
|000032d0| 6f 20 74 68 65 20 70 72 | 6f 70 65 72 74 79 20 74 |o the pr|operty t|
|000032e0| 79 70 65 20 61 6e 64 20 | 72 65 74 75 72 6e 20 3c |ype and |return <|
|000032f0| 73 74 72 6f 6e 67 3e 76 | 6f 69 64 3c 2f 73 74 72 |strong>v|oid</str|
|00003300| 6f 6e 67 3e 2e 20 46 6f | 72 20 65 78 61 6d 70 6c |ong>. Fo|r exampl|
|00003310| 65 2c 20 74 68 65 0d 0a | 63 6f 6d 70 6f 6e 65 6e |e, the..|componen|
|00003320| 74 20 70 72 6f 70 65 72 | 74 79 20 3c 65 6d 3e 62 |t proper|ty <em>b|
|00003330| 61 63 6b 67 72 6f 75 6e | 64 3c 2f 65 6d 3e 20 28 |ackgroun|d</em> (|
|00003340| 77 68 69 63 68 20 63 6f | 6e 74 61 69 6e 73 20 74 |which co|ntains t|
|00003350| 68 65 20 73 74 61 74 65 | 20 6f 66 20 74 68 65 20 |he state| of the |
|00003360| 63 6f 6d 70 6f 6e 65 6e | 74 27 73 0d 0a 62 61 63 |componen|t's..bac|
|00003370| 6b 67 72 6f 75 6e 64 20 | 63 6f 6c 6f 72 29 20 77 |kground |color) w|
|00003380| 6f 75 6c 64 20 68 61 76 | 65 20 61 63 63 65 73 73 |ould hav|e access|
|00003390| 6f 72 20 6d 65 74 68 6f | 64 73 20 77 69 74 68 20 |or metho|ds with |
|000033a0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 73 69 |the foll|owing si|
|000033b0| 67 6e 61 74 75 72 65 73 | 3a 0d 0a 0d 0a 3c 50 52 |gnatures|:....<PR|
|000033c0| 45 3e 0d 0a 3c 73 74 72 | 6f 6e 67 3e 70 75 62 6c |E>..<str|ong>publ|
|000033d0| 69 63 3c 2f 73 74 72 6f | 6e 67 3e 20 43 6f 6c 6f |ic</stro|ng> Colo|
|000033e0| 72 20 67 65 74 42 61 63 | 6b 67 72 6f 75 6e 64 28 |r getBac|kground(|
|000033f0| 29 3b 0d 0a 3c 73 74 72 | 6f 6e 67 3e 70 75 62 6c |);..<str|ong>publ|
|00003400| 69 63 20 76 6f 69 64 3c | 2f 73 74 72 6f 6e 67 3e |ic void<|/strong>|
|00003410| 20 73 65 74 42 61 63 6b | 67 72 6f 75 6e 64 28 43 | setBack|ground(C|
|00003420| 6f 6c 6f 72 20 63 6f 6c | 6f 72 29 3b 0d 0a 3c 2f |olor col|or);..</|
|00003430| 50 52 45 3e 0d 0a 0d 0a | 50 72 6f 70 65 72 74 69 |PRE>....|Properti|
|00003440| 65 73 20 63 61 6e 20 68 | 61 76 65 20 6d 75 6c 74 |es can h|ave mult|
|00003450| 69 70 6c 65 20 77 72 69 | 74 65 20 61 63 63 65 73 |iple wri|te acces|
|00003460| 73 6f 72 20 6d 65 74 68 | 6f 64 73 2c 20 62 75 74 |sor meth|ods, but|
|00003470| 20 74 68 65 79 20 6d 75 | 73 74 20 68 61 76 65 0d | they mu|st have.|
|00003480| 0a 6f 6e 65 20 77 69 74 | 68 20 74 68 65 20 73 69 |.one wit|h the si|
|00003490| 67 6e 61 74 75 72 65 20 | 73 68 6f 77 6e 20 68 65 |gnature |shown he|
|000034a0| 72 65 2e 20 41 6e 79 20 | 6f 76 65 72 6c 6f 61 64 |re. Any |overload|
|000034b0| 65 64 20 6d 65 74 68 6f | 64 73 20 61 72 65 20 73 |ed metho|ds are s|
|000034c0| 69 6d 70 6c 79 20 63 6f | 6d 70 6f 6e 65 6e 74 0d |imply co|mponent.|
|000034d0| 0a 6d 65 74 68 6f 64 73 | 20 66 6f 72 20 70 72 6f |.methods| for pro|
|000034e0| 67 72 61 6d 6d 61 74 69 | 63 20 61 63 63 65 73 73 |grammati|c access|
|000034f0| 20 74 6f 20 74 68 65 20 | 70 72 6f 70 65 72 74 79 | to the |property|
|00003500| 2e 20 54 68 65 79 20 64 | 6f 20 6e 6f 74 20 61 70 |. They d|o not ap|
|00003510| 70 65 61 72 20 69 6e 0d | 0a 74 68 65 20 49 6e 73 |pear in.|.the Ins|
|00003520| 70 65 63 74 6f 72 2e 0d | 0a 0d 0a 3c 50 3e 46 6f |pector..|...<P>Fo|
|00003530| 72 20 64 65 74 61 69 6c | 73 20 6f 66 20 70 72 6f |r detail|s of pro|
|00003540| 70 65 72 74 79 20 73 70 | 65 63 69 66 69 63 61 74 |perty sp|ecificat|
|00003550| 69 6f 6e 2c 20 73 65 65 | 20 3c 41 20 48 52 45 46 |ion, see| <A HREF|
|00003560| 3d 22 70 72 6f 70 65 72 | 74 69 65 73 2e 68 74 6d |="proper|ties.htm|
|00003570| 6c 22 3e 43 72 65 61 74 | 69 6e 67 0d 0a 70 72 6f |l">Creat|ing..pro|
|00003580| 70 65 72 74 69 65 73 3c | 2f 41 3e 2e 0d 0a 0d 0a |perties<|/A>.....|
|00003590| 3c 50 3e 0d 0a 3c 4c 49 | 3e 0d 0a 41 20 4a 61 76 |<P>..<LI|>..A Jav|
|000035a0| 61 20 63 6f 6d 70 6f 6e | 65 6e 74 20 75 73 75 61 |a compon|ent usua|
|000035b0| 6c 6c 79 20 68 61 73 20 | 3c 41 20 48 52 45 46 3d |lly has |<A HREF=|
|000035c0| 22 23 63 6f 6d 70 6f 6e | 65 6e 74 65 76 65 6e 74 |"#compon|entevent|
|000035d0| 73 22 3e 65 76 65 6e 74 | 73 3c 2f 41 3e 2c 20 77 |s">event|s</A>, w|
|000035e0| 68 69 63 68 0d 0a 68 61 | 76 65 20 70 75 62 6c 69 |hich..ha|ve publi|
|000035f0| 63 20 72 65 67 69 73 74 | 72 61 74 69 6f 6e 20 6d |c regist|ration m|
|00003600| 65 74 68 6f 64 73 20 73 | 69 6d 69 6c 61 72 20 74 |ethods s|imilar t|
|00003610| 6f 20 70 72 6f 70 65 72 | 74 79 20 61 63 63 65 73 |o proper|ty acces|
|00003620| 73 6f 72 20 6d 65 74 68 | 6f 64 73 2e 0d 0a 45 76 |sor meth|ods...Ev|
|00003630| 65 6e 74 73 2c 20 77 68 | 69 63 68 20 63 61 6e 20 |ents, wh|ich can |
|00003640| 62 65 20 75 6e 69 63 61 | 73 74 20 28 6f 6e 6c 79 |be unica|st (only|
|00003650| 20 6f 6e 65 20 6f 62 6a | 65 63 74 20 69 73 20 6e | one obj|ect is n|
|00003660| 6f 74 69 66 69 65 64 20 | 6f 66 20 74 68 65 20 65 |otified |of the e|
|00003670| 76 65 6e 74 29 2c 0d 0a | 6f 72 20 6d 75 6c 74 69 |vent),..|or multi|
|00003680| 63 61 73 74 20 28 65 61 | 63 68 20 6f 62 6a 65 63 |cast (ea|ch objec|
|00003690| 74 20 69 6e 20 61 20 6c | 69 73 74 20 6f 66 20 6c |t in a l|ist of l|
|000036a0| 69 73 74 65 6e 65 72 73 | 20 69 73 20 6e 6f 74 69 |isteners| is noti|
|000036b0| 66 69 65 64 20 6f 66 20 | 74 68 65 20 65 76 65 6e |fied of |the even|
|000036c0| 74 29 2c 0d 0a 68 61 76 | 65 20 74 77 6f 20 66 6f |t),..hav|e two fo|
|000036d0| 72 6d 73 20 6f 66 20 72 | 65 67 69 73 74 72 61 74 |rms of r|egistrat|
|000036e0| 69 6f 6e 20 6d 65 74 68 | 6f 64 73 2e 20 48 65 72 |ion meth|ods. Her|
|000036f0| 65 20 69 73 20 74 68 65 | 20 66 6f 72 6d 20 66 6f |e is the| form fo|
|00003700| 72 20 61 20 75 6e 69 63 | 61 73 74 20 0d 0a 65 76 |r a unic|ast ..ev|
|00003710| 65 6e 74 3a 3c 2f 4c 49 | 3e 0d 0a 0d 0a 3c 50 52 |ent:</LI|>....<PR|
|00003720| 45 3e 0d 0a 3c 73 74 72 | 6f 6e 67 3e 70 75 62 6c |E>..<str|ong>publ|
|00003730| 69 63 20 76 6f 69 64 20 | 3c 2f 73 74 72 6f 6e 67 |ic void |</strong|
|00003740| 3e 61 64 64 26 6c 74 3b | 65 76 65 6e 74 26 67 74 |>add&lt;|event&gt|
|00003750| 3b 4c 69 73 74 65 6e 65 | 72 28 26 6c 74 3b 65 76 |;Listene|r(&lt;ev|
|00003760| 65 6e 74 26 67 74 3b 4c | 69 73 74 65 6e 65 72 20 |ent&gt;L|istener |
|00003770| 26 6c 74 3b 6c 69 73 74 | 65 6e 65 72 26 67 74 3b |&lt;list|ener&gt;|
|00003780| 29 20 74 68 72 6f 77 73 | 20 54 6f 6f 4d 61 79 4c |) throws| TooMayL|
|00003790| 69 73 74 65 6e 65 72 73 | 3b 0d 0a 3c 2f 50 52 45 |isteners|;..</PRE|
|000037a0| 3e 0d 0a 0d 0a 54 68 65 | 20 61 64 64 20 6c 69 73 |>....The| add lis|
|000037b0| 74 65 6e 65 72 20 6d 65 | 74 68 6f 64 20 66 6f 72 |tener me|thod for|
|000037c0| 20 6d 75 6c 74 69 63 61 | 73 74 20 65 76 65 6e 74 | multica|st event|
|000037d0| 73 20 69 73 20 74 68 65 | 20 73 61 6d 65 2c 20 65 |s is the| same, e|
|000037e0| 78 63 65 70 74 20 74 68 | 61 74 20 69 74 0d 0a 64 |xcept th|at it..d|
|000037f0| 6f 65 73 20 6e 6f 74 20 | 74 68 72 6f 77 20 74 68 |oes not |throw th|
|00003800| 65 20 3c 65 6d 3e 54 6f | 6f 4d 61 6e 79 4c 69 73 |e <em>To|oManyLis|
|00003810| 74 65 6e 65 72 73 45 78 | 63 65 70 74 69 6f 6e 3c |tenersEx|ception<|
|00003820| 2f 65 6d 3e 3a 0d 0a 0d | 0a 3c 50 52 45 3e 0d 0a |/em>:...|.<PRE>..|
|00003830| 3c 73 74 72 6f 6e 67 3e | 70 75 62 6c 69 63 20 20 |<strong>|public |
|00003840| 76 6f 69 64 3c 2f 73 74 | 72 6f 6e 67 3e 20 61 64 |void</st|rong> ad|
|00003850| 64 26 6c 74 3b 65 76 65 | 6e 74 26 67 74 3b 4c 69 |d&lt;eve|nt&gt;Li|
|00003860| 73 74 65 6e 65 72 20 28 | 26 6c 74 3b 65 76 65 6e |stener (|&lt;even|
|00003870| 74 26 67 74 3b 4c 69 73 | 74 65 6e 65 72 20 26 6c |t&gt;Lis|tener &l|
|00003880| 74 3b 6c 69 73 74 65 6e | 65 72 26 67 74 3b 29 3b |t;listen|er&gt;);|
|00003890| 0d 0a 3c 2f 50 52 45 3e | 0d 0a 0d 0a 42 6f 74 68 |..</PRE>|....Both|
|000038a0| 20 75 6e 69 63 61 73 74 | 20 61 6e 64 20 6d 75 6c | unicast| and mul|
|000038b0| 74 69 63 61 73 74 20 75 | 73 65 20 74 68 65 20 73 |ticast u|se the s|
|000038c0| 61 6d 65 20 66 6f 72 6d | 20 6f 66 20 74 68 65 20 |ame form| of the |
|000038d0| 72 65 6d 6f 76 65 20 6c | 69 73 74 65 6e 65 72 20 |remove l|istener |
|000038e0| 6d 65 74 68 6f 64 3a 0d | 0a 0d 0a 3c 50 52 45 3e |method:.|...<PRE>|
|000038f0| 0d 0a 3c 73 74 72 6f 6e | 67 3e 70 75 62 6c 69 63 |..<stron|g>public|
|00003900| 20 20 76 6f 69 64 3c 2f | 73 74 72 6f 6e 67 3e 20 | void</|strong> |
|00003910| 72 65 6d 6f 76 65 26 6c | 74 3b 65 76 65 6e 74 26 |remove&l|t;event&|
|00003920| 67 74 3b 4c 69 73 74 65 | 6e 65 72 28 26 6c 74 3b |gt;Liste|ner(&lt;|
|00003930| 65 76 65 6e 74 26 67 74 | 3b 4c 69 73 74 65 6e 65 |event&gt|;Listene|
|00003940| 72 20 26 6c 74 3b 6c 69 | 73 74 65 6e 65 72 26 67 |r &lt;li|stener&g|
|00003950| 74 3b 29 3b 0d 0a 3c 2f | 50 52 45 3e 0d 0a 0d 0a |t;);..</|PRE>....|
|00003960| 3c 70 3e 46 6f 72 20 65 | 78 61 6d 70 6c 65 2c 20 |<p>For e|xample, |
|00003970| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 69 73 |the foll|owing is|
|00003980| 20 61 20 64 65 63 6c 61 | 72 61 74 69 6f 6e 20 66 | a decla|ration f|
|00003990| 6f 72 20 61 6e 20 3c 65 | 6d 3e 61 64 64 53 65 6c |or an <e|m>addSel|
|000039a0| 65 63 74 69 6f 6e 4c 69 | 73 74 65 6e 65 72 28 29 |ectionLi|stener()|
|000039b0| 3c 2f 65 6d 3e 20 6d 65 | 74 68 6f 64 3a 0d 0a 0d |</em> me|thod:...|
|000039c0| 0a 3c 50 52 45 3e 0d 0a | 3c 73 74 72 6f 6e 67 3e |.<PRE>..|<strong>|
|000039d0| 70 75 62 6c 69 63 20 76 | 6f 69 64 3c 2f 73 74 72 |public v|oid</str|
|000039e0| 6f 6e 67 3e 20 61 64 64 | 53 65 6c 65 63 74 69 6f |ong> add|Selectio|
|000039f0| 6e 4c 69 73 74 65 6e 65 | 72 28 56 65 63 74 6f 72 |nListene|r(Vector|
|00003a00| 53 65 6c 65 63 74 69 6f | 6e 4c 69 73 74 65 6e 65 |Selectio|nListene|
|00003a10| 72 20 6c 69 73 74 65 6e | 65 72 29 0d 0a 3c 2f 50 |r listen|er)..</P|
|00003a20| 52 45 3e 0d 0a 0d 0a 20 | 57 68 65 6e 20 61 20 63 |RE>.... |When a c|
|00003a30| 6f 6e 74 61 69 6e 65 72 | 20 63 61 6c 6c 73 20 3c |ontainer| calls <|
|00003a40| 65 6d 3e 61 64 64 53 65 | 6c 65 63 74 69 6f 6e 4c |em>addSe|lectionL|
|00003a50| 69 73 74 65 6e 65 72 28 | 29 3c 2f 65 6d 3e 2c 20 |istener(|)</em>, |
|00003a60| 74 68 65 20 63 6f 6e 74 | 61 69 6e 65 72 20 69 73 |the cont|ainer is|
|00003a70| 20 72 65 67 69 73 74 65 | 72 65 64 20 77 69 74 68 | registe|red with|
|00003a80| 20 74 68 65 20 73 6f 75 | 72 63 65 20 63 6f 6d 70 | the sou|rce comp|
|00003a90| 6f 6e 65 6e 74 20 74 68 | 61 74 20 64 65 66 69 6e |onent th|at defin|
|00003aa0| 65 73 20 74 68 65 20 6d | 65 74 68 6f 64 20 61 73 |es the m|ethod as|
|00003ab0| 20 61 20 6c 69 73 74 65 | 6e 65 72 20 6f 66 20 76 | a liste|ner of v|
|00003ac0| 65 63 74 6f 72 2d 6d 6f | 64 65 6c 20 73 65 6c 65 |ector-mo|del sele|
|00003ad0| 63 74 69 6f 6e 20 65 76 | 65 6e 74 73 2e 0d 0a 0d |ction ev|ents....|
|00003ae0| 0a 0d 0a 3c 70 3e 45 76 | 65 6e 74 73 20 61 6e 64 |...<p>Ev|ents and|
|00003af0| 20 65 76 65 6e 74 20 72 | 65 67 69 73 74 72 61 74 | event r|egistrat|
|00003b00| 69 6f 6e 20 6d 65 74 68 | 6f 64 73 20 61 72 65 20 |ion meth|ods are |
|00003b10| 65 78 70 6c 61 69 6e 65 | 64 20 69 6e 20 6d 6f 72 |explaine|d in mor|
|00003b20| 65 20 64 65 70 74 68 20 | 69 6e 20 3c 41 20 48 52 |e depth |in <A HR|
|00003b30| 45 46 3d 22 65 76 65 6e | 74 73 2e 68 74 6d 6c 22 |EF="even|ts.html"|
|00003b40| 3e 57 6f 72 6b 69 6e 67 | 20 77 69 74 68 20 65 76 |>Working| with ev|
|00003b50| 65 6e 74 73 3c 2f 41 3e | 2e 0d 0a 0d 0a 3c 2f 55 |ents</A>|.....</U|
|00003b60| 4c 3e 0d 0a 0d 0a 49 6e | 20 61 64 64 69 74 69 6f |L>....In| additio|
|00003b70| 6e 20 74 6f 20 74 68 65 | 73 65 20 72 65 71 75 69 |n to the|se requi|
|00003b80| 72 65 6d 65 6e 74 73 2c | 20 74 68 65 20 4a 61 76 |rements,| the Jav|
|00003b90| 61 42 65 61 6e 73 20 73 | 70 65 63 69 66 69 63 61 |aBeans s|pecifica|
|00003ba0| 74 69 6f 6e 20 61 74 20 | 68 74 74 70 3a 2f 2f 73 |tion at |http://s|
|00003bb0| 70 6c 61 73 68 2e 6a 61 | 76 61 73 6f 66 74 2e 63 |plash.ja|vasoft.c|
|00003bc0| 6f 6d 2f 62 65 61 6e 73 | 2f 0d 0a 70 72 6f 76 69 |om/beans|/..provi|
|00003bd0| 64 65 73 20 67 75 69 64 | 65 6c 69 6e 65 73 20 74 |des guid|elines t|
|00003be0| 6f 20 68 65 6c 70 20 79 | 6f 75 20 74 6f 20 77 72 |o help y|ou to wr|
|00003bf0| 69 74 65 20 77 65 6c 6c | 2d 64 65 73 69 67 6e 65 |ite well|-designe|
|00003c00| 64 20 63 6f 6d 70 6f 6e | 65 6e 74 73 20 74 68 61 |d compon|ents tha|
|00003c10| 74 0d 0a 69 6e 74 65 72 | 61 63 74 20 77 65 6c 6c |t..inter|act well|
|00003c20| 20 77 69 74 68 20 6f 74 | 68 65 72 20 4a 61 76 61 | with ot|her Java|
|00003c30| 20 63 6f 6d 70 6f 6e 65 | 6e 74 73 2e 0d 0a 0d 0a | compone|nts.....|
|00003c40| 3c 50 3e 0d 0a 3c 48 52 | 3e 3c 21 2d 2d 2a 2a 2a |<P>..<HR|><!--***|
|00003c50| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003c60| 54 48 45 20 50 41 52 54 | 53 20 4f 46 20 41 20 43 |THE PART|S OF A C|
|00003c70| 4f 4d 50 4f 4e 45 4e 54 | 2a 2a 2a 2a 2a 2a 2a 2a |OMPONENT|********|
|00003c80| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2d 2d |********|******--|
|00003c90| 3e 3c 41 20 4e 41 4d 45 | 3d 22 74 68 65 70 61 72 |><A NAME|="thepar|
|00003ca0| 74 73 6f 66 61 63 6f 6d | 70 6f 6e 65 6e 74 22 3e |tsofacom|ponent">|
|00003cb0| 3c 2f 41 3e 0d 0a 3c 48 | 32 3e 54 68 65 20 70 61 |</A>..<H|2>The pa|
|00003cc0| 72 74 73 20 6f 66 20 61 | 20 63 6f 6d 70 6f 6e 65 |rts of a| compone|
|00003cd0| 6e 74 3c 2f 48 32 3e 0d | 0a 3c 21 2d 2d 42 4e 44 |nt</H2>.|.<!--BND|
|00003ce0| 58 3d 22 63 6f 6d 70 6f | 6e 65 6e 74 73 3a 6f 76 |X="compo|nents:ov|
|00003cf0| 65 72 76 69 65 77 3b 63 | 6f 6d 70 6f 6e 65 6e 74 |erview;c|omponent|
|00003d00| 20 77 72 69 74 69 6e 67 | 3a 6f 76 65 72 76 69 65 | writing|:overvie|
|00003d10| 77 22 2d 2d 3e 0d 0a 0d | 0a 44 65 73 69 67 6e 65 |w"-->...|.Designe|
|00003d20| 64 20 74 6f 20 77 6f 72 | 6b 20 77 69 74 68 20 76 |d to wor|k with v|
|00003d30| 69 73 75 61 6c 20 64 65 | 73 69 67 6e 20 74 6f 6f |isual de|sign too|
|00003d40| 6c 73 20 6c 69 6b 65 20 | 4a 42 75 69 6c 64 65 72 |ls like |JBuilder|
|00003d50| 2c 20 63 6f 6d 70 6f 6e | 65 6e 74 73 20 74 79 70 |, compon|ents typ|
|00003d60| 69 63 61 6c 6c 79 20 68 | 61 76 65 0d 0a 3c 73 74 |ically h|ave..<st|
|00003d70| 72 6f 6e 67 3e 70 75 62 | 6c 69 63 20 3c 2f 73 74 |rong>pub|lic </st|
|00003d80| 72 6f 6e 67 3e 3c 41 20 | 48 52 45 46 3d 22 23 63 |rong><A |HREF="#c|
|00003d90| 6f 6d 70 6f 6e 65 6e 74 | 70 72 6f 70 65 72 74 69 |omponent|properti|
|00003da0| 65 73 22 3e 70 72 6f 70 | 65 72 74 69 65 73 3c 2f |es">prop|erties</|
|00003db0| 41 3e 2c 20 3c 41 20 48 | 52 45 46 3d 22 23 63 6f |A>, <A H|REF="#co|
|00003dc0| 6d 70 6f 6e 65 6e 74 6d | 65 74 68 6f 64 73 22 3e |mponentm|ethods">|
|00003dd0| 6d 65 74 68 6f 64 73 3c | 2f 41 3e 2c 0d 0a 61 6e |methods<|/A>,..an|
|00003de0| 64 20 3c 41 20 48 52 45 | 46 3d 22 23 63 6f 6d 70 |d <A HRE|F="#comp|
|00003df0| 6f 6e 65 6e 74 65 76 65 | 6e 74 73 22 3e 65 76 65 |onenteve|nts">eve|
|00003e00| 6e 74 73 3c 2f 41 3e 20 | 61 76 61 69 6c 61 62 6c |nts</A> |availabl|
|00003e10| 65 20 74 6f 20 63 6f 6d | 70 6f 6e 65 6e 74 20 75 |e to com|ponent u|
|00003e20| 73 65 72 73 2e 0d 0a 0d | 0a 3c 41 20 4e 41 4d 45 |sers....|.<A NAME|
|00003e30| 3d 22 63 6f 6d 70 6f 6e | 65 6e 74 70 72 6f 70 65 |="compon|entprope|
|00003e40| 72 74 69 65 73 22 3e 3c | 2f 41 3e 0d 0a 3c 48 33 |rties"><|/A>..<H3|
|00003e50| 3e 43 6f 6d 70 6f 6e 65 | 6e 74 20 70 72 6f 70 65 |>Compone|nt prope|
|00003e60| 72 74 69 65 73 3c 2f 48 | 33 3e 0d 0a 3c 21 2d 2d |rties</H|3>..<!--|
|00003e70| 42 4e 44 58 3d 22 63 6f | 6d 70 6f 6e 65 6e 74 73 |BNDX="co|mponents|
|00003e80| 3a 73 65 74 74 69 6e 67 | 73 2e 20 53 65 65 20 70 |:setting|s. See p|
|00003e90| 72 6f 70 65 72 74 69 65 | 73 3b 70 72 6f 70 65 72 |ropertie|s;proper|
|00003ea0| 74 69 65 73 22 2d 2d 3e | 0d 0a 0d 0a 3c 65 6d 3e |ties"-->|....<em>|
|00003eb0| 50 72 6f 70 65 72 74 69 | 65 73 3c 2f 65 6d 3e 20 |Properti|es</em> |
|00003ec0| 61 6c 6c 6f 77 20 74 68 | 65 20 63 6f 6d 70 6f 6e |allow th|e compon|
|00003ed0| 65 6e 74 20 75 73 65 72 | 20 74 6f 20 63 68 61 6e |ent user| to chan|
|00003ee0| 67 65 20 74 68 65 20 73 | 74 61 74 65 20 6f 66 20 |ge the s|tate of |
|00003ef0| 61 20 63 6f 6d 70 6f 6e | 65 6e 74 2e 20 54 68 65 |a compon|ent. The|
|00003f00| 79 20 70 72 6f 76 69 64 | 65 20 74 68 65 20 69 6c |y provid|e the il|
|00003f10| 6c 75 73 69 6f 6e 20 6f | 66 20 73 65 74 74 69 6e |lusion o|f settin|
|00003f20| 67 20 6f 72 20 72 65 61 | 64 69 6e 67 20 74 68 65 |g or rea|ding the|
|00003f30| 20 76 61 6c 75 65 20 6f | 66 20 61 20 76 61 72 69 | value o|f a vari|
|00003f40| 61 62 6c 65 20 69 6e 20 | 74 68 65 20 63 6f 6d 70 |able in |the comp|
|00003f50| 6f 6e 65 6e 74 20 77 68 | 69 6c 65 20 68 69 64 69 |onent wh|ile hidi|
|00003f60| 6e 67 20 74 68 65 20 69 | 6e 74 65 72 6e 61 6c 20 |ng the i|nternal |
|00003f70| 69 6d 70 6c 65 6d 65 6e | 74 61 74 69 6f 6e 2e 20 |implemen|tation. |
|00003f80| 42 79 20 63 72 65 61 74 | 69 6e 67 20 61 20 70 72 |By creat|ing a pr|
|00003f90| 6f 70 65 72 74 79 2c 20 | 74 68 65 20 63 6f 6d 70 |operty, |the comp|
|00003fa0| 6f 6e 65 6e 74 20 77 72 | 69 74 65 72 20 63 61 6e |onent wr|iter can|
|00003fb0| 20 61 6c 6c 6f 77 20 61 | 63 63 65 73 73 20 74 6f | allow a|ccess to|
|00003fc0| 20 74 68 65 20 73 74 61 | 74 65 20 6f 66 20 74 68 | the sta|te of th|
|00003fd0| 65 20 63 6f 6d 70 6f 6e | 65 6e 74 20 77 69 74 68 |e compon|ent with|
|00003fe0| 6f 75 74 20 65 78 70 6f | 73 69 6e 67 20 74 68 65 |out expo|sing the|
|00003ff0| 20 75 6e 64 65 72 6c 79 | 69 6e 67 20 64 61 74 61 | underly|ing data|
|00004000| 20 73 74 72 75 63 74 75 | 72 65 2e 0d 0a 0d 0a 3c | structu|re.....<|
|00004010| 50 3e 55 73 69 6e 67 20 | 70 72 6f 70 65 72 74 69 |P>Using |properti|
|00004020| 65 73 20 69 6e 20 63 6f | 6d 70 6f 6e 65 6e 74 73 |es in co|mponents|
|00004030| 20 68 61 73 20 61 20 6e | 75 6d 62 65 72 20 6f 66 | has a n|umber of|
|00004040| 20 61 64 76 61 6e 74 61 | 67 65 73 3a 0d 0a 3c 55 | advanta|ges:..<U|
|00004050| 4c 3e 0d 0a 3c 4c 49 3e | 0d 0a 50 72 6f 70 65 72 |L>..<LI>|..Proper|
|00004060| 74 69 65 73 20 61 72 65 | 20 61 76 61 69 6c 61 62 |ties are| availab|
|00004070| 6c 65 20 61 74 20 64 65 | 73 69 67 6e 20 74 69 6d |le at de|sign tim|
|00004080| 65 2e 3c 2f 4c 49 3e 0d | 0a 0d 0a 3c 70 3e 50 72 |e.</LI>.|...<p>Pr|
|00004090| 6f 70 65 72 74 69 65 73 | 20 74 61 6b 65 20 61 64 |operties| take ad|
|000040a0| 76 61 6e 74 61 67 65 20 | 6f 66 20 74 68 65 20 66 |vantage |of the f|
|000040b0| 75 6c 6c 20 70 6f 77 65 | 72 20 6f 66 20 4a 42 75 |ull powe|r of JBu|
|000040c0| 69 6c 64 65 72 27 73 20 | 55 49 20 44 65 73 69 67 |ilder's |UI Desig|
|000040d0| 6e 65 72 2e 0d 0a 54 68 | 65 20 63 6f 6d 70 6f 6e |ner...Th|e compon|
|000040e0| 65 6e 74 20 75 73 65 72 | 20 63 61 6e 20 63 68 61 |ent user| can cha|
|000040f0| 6e 67 65 20 74 68 65 20 | 73 74 61 74 65 20 6f 66 |nge the |state of|
|00004100| 20 61 20 63 6f 6d 70 6f | 6e 65 6e 74 20 28 62 79 | a compo|nent (by|
|00004110| 20 73 65 74 74 69 6e 67 | 20 61 20 70 72 6f 70 65 | setting| a prope|
|00004120| 72 74 79 0d 0a 76 61 6c | 75 65 29 20 61 6e 64 20 |rty..val|ue) and |
|00004130| 69 6d 6d 65 64 69 61 74 | 65 6c 79 20 73 65 65 20 |immediat|ely see |
|00004140| 74 68 65 20 65 66 66 65 | 63 74 73 20 6f 66 20 74 |the effe|cts of t|
|00004150| 68 61 74 20 63 68 61 6e | 67 65 20 6f 6e 20 74 68 |hat chan|ge on th|
|00004160| 65 20 70 72 6f 67 72 61 | 6d 2e 20 42 79 20 64 65 |e progra|m. By de|
|00004170| 66 61 75 6c 74 2c 20 61 | 6c 6c 20 6f 66 20 61 20 |fault, a|ll of a |
|00004180| 63 6f 6d 70 6f 6e 65 6e | 74 27 73 20 3c 73 74 72 |componen|t's <str|
|00004190| 6f 6e 67 3e 70 75 62 6c | 69 63 3c 2f 73 74 72 6f |ong>publ|ic</stro|
|000041a0| 6e 67 3e 20 70 72 6f 70 | 65 72 74 69 65 73 20 61 |ng> prop|erties a|
|000041b0| 72 65 20 61 76 61 69 6c | 61 62 6c 65 20 74 6f 20 |re avail|able to |
|000041c0| 6f 74 68 65 72 20 63 6f | 6d 70 6f 6e 65 6e 74 73 |other co|mponents|
|000041d0| 2c 20 62 75 74 20 79 6f | 75 20 63 61 6e 20 63 6f |, but yo|u can co|
|000041e0| 6e 74 72 6f 6c 20 64 65 | 73 69 67 6e 2d 74 69 6d |ntrol de|sign-tim|
|000041f0| 65 20 61 63 63 65 73 73 | 20 74 6f 20 63 6f 6d 70 |e access| to comp|
|00004200| 6f 6e 65 6e 74 20 70 72 | 6f 70 65 72 74 69 65 73 |onent pr|operties|
|00004210| 20 62 79 20 75 73 69 6e | 67 20 74 68 65 20 6f 70 | by usin|g the op|
|00004220| 74 69 6f 6e 61 6c 20 3c | 41 20 48 52 45 46 3d 22 |tional <|A HREF="|
|00004230| 62 65 61 6e 2e 68 74 6d | 6c 22 3e 3c 65 6d 3e 42 |bean.htm|l"><em>B|
|00004240| 65 61 6e 49 6e 66 6f 3c | 2f 65 6d 3e 20 69 6e 74 |eanInfo<|/em> int|
|00004250| 65 72 66 61 63 65 3c 2f | 41 3e 20 74 6f 20 73 70 |erface</|A> to sp|
|00004260| 65 63 69 66 79 20 77 68 | 69 63 68 20 70 72 6f 70 |ecify wh|ich prop|
|00004270| 65 72 74 69 65 73 20 73 | 68 6f 75 6c 64 20 62 65 |erties s|hould be|
|00004280| 20 65 78 70 6f 73 65 64 | 2e 3c 70 3e 0d 0a 0d 0a | exposed|.<p>....|
|00004290| 3c 4c 49 3e 0d 0a 50 72 | 6f 70 65 72 74 69 65 73 |<LI>..Pr|operties|
|000042a0| 20 68 69 64 65 20 73 70 | 65 63 69 66 69 63 20 69 | hide sp|ecific i|
|000042b0| 6d 70 6c 65 6d 65 6e 74 | 61 74 69 6f 6e 2e 3c 2f |mplement|ation.</|
|000042c0| 4c 49 3e 0d 0a 0d 0a 3c | 70 3e 59 6f 75 20 63 61 |LI>....<|p>You ca|
|000042d0| 6e 20 69 6e 63 6c 75 64 | 65 20 63 6f 6d 70 6c 65 |n includ|e comple|
|000042e0| 78 20 66 75 6e 63 74 69 | 6f 6e 61 6c 69 74 79 20 |x functi|onality |
|000042f0| 69 6e 20 61 20 70 72 6f | 70 65 72 74 79 27 73 20 |in a pro|perty's |
|00004300| 61 63 63 65 73 73 6f 72 | 20 6d 65 74 68 6f 64 73 |accessor| methods|
|00004310| 2e 0d 0a 54 68 65 20 63 | 6f 6d 70 6f 6e 65 6e 74 |...The c|omponent|
|00004320| 20 75 73 65 72 20 6e 65 | 65 64 20 6e 65 76 65 72 | user ne|ed never|
|00004330| 20 6b 6e 6f 77 20 61 62 | 6f 75 74 20 74 68 61 74 | know ab|out that|
|00004340| 20 66 75 6e 63 74 69 6f | 6e 61 6c 69 74 79 2c 20 | functio|nality, |
|00004350| 62 75 74 20 73 69 6d 70 | 6c 79 0d 0a 6d 61 6b 65 |but simp|ly..make|
|00004360| 20 74 68 65 20 3c 65 6d | 3e 73 65 74 50 72 6f 70 | the <em|>setProp|
|00004370| 65 72 74 79 28 29 3c 2f | 65 6d 3e 20 6f 72 20 3c |erty()</|em> or <|
|00004380| 65 6d 3e 67 65 74 50 72 | 6f 70 65 72 74 79 28 29 |em>getPr|operty()|
|00004390| 3c 2f 65 6d 3e 20 6d 65 | 74 68 6f 64 20 63 61 6c |</em> me|thod cal|
|000043a0| 6c 2e 20 41 20 70 72 6f | 70 65 72 74 79 20 74 68 |l. A pro|perty th|
|000043b0| 61 74 20 6c 6f 6f 6b 73 | 20 6c 69 6b 65 20 61 20 |at looks| like a |
|000043c0| 73 69 6d 70 6c 65 20 6e | 75 6d 62 65 72 20 63 61 |simple n|umber ca|
|000043d0| 6e 20 61 63 74 75 61 6c | 6c 79 20 62 65 20 61 20 |n actual|ly be a |
|000043e0| 63 6f 6d 70 6c 65 78 20 | 63 61 6c 63 75 6c 61 74 |complex |calculat|
|000043f0| 69 6f 6e 20 6f 72 0d 0a | 61 20 6c 6f 6f 6b 75 70 |ion or..|a lookup|
|00004400| 20 69 6e 20 61 20 64 61 | 74 61 62 61 73 65 2e 20 | in a da|tabase. |
|00004410| 59 6f 75 72 20 63 6f 6d | 70 6f 6e 65 6e 74 20 75 |Your com|ponent u|
|00004420| 73 65 72 73 20 64 6f 6e | 27 74 20 68 61 76 65 20 |sers don|'t have |
|00004430| 74 6f 20 64 65 61 6c 20 | 77 69 74 68 20 74 68 61 |to deal |with tha|
|00004440| 74 0d 0a 63 6f 6d 70 6c | 65 78 69 74 79 2e 3c 70 |t..compl|exity.<p|
|00004450| 3e 0d 0a 0d 0a 3c 4c 49 | 3e 0d 0a 50 72 6f 70 65 |>....<LI|>..Prope|
|00004460| 72 74 69 65 73 20 61 6c | 6c 6f 77 20 61 20 73 69 |rties al|low a si|
|00004470| 6d 70 6c 65 20 61 73 73 | 69 67 6e 6d 65 6e 74 20 |mple ass|ignment |
|00004480| 74 6f 20 63 61 75 73 65 | 20 61 70 70 72 6f 70 72 |to cause| appropr|
|00004490| 69 61 74 65 20 73 69 64 | 65 2d 65 66 66 65 63 74 |iate sid|e-effect|
|000044a0| 73 2e 3c 2f 4c 49 3e 0d | 0a 0d 0a 3c 70 3e 59 6f |s.</LI>.|...<p>Yo|
|000044b0| 75 20 63 61 6e 20 68 61 | 76 65 20 74 68 65 20 61 |u can ha|ve the a|
|000044c0| 63 63 65 73 73 6f 72 20 | 6d 65 74 68 6f 64 20 6e |ccessor |method n|
|000044d0| 6f 74 69 66 79 20 6f 74 | 68 65 72 20 6f 62 6a 65 |otify ot|her obje|
|000044e0| 63 74 73 20 6f 72 20 63 | 61 6c 6c 20 6f 74 68 65 |cts or c|all othe|
|000044f0| 72 0d 0a 6d 65 74 68 6f | 64 73 20 77 68 65 6e 65 |r..metho|ds whene|
|00004500| 76 65 72 20 61 20 70 72 | 6f 70 65 72 74 79 20 69 |ver a pr|operty i|
|00004510| 73 20 73 65 74 20 6f 72 | 20 72 65 61 64 2e 20 54 |s set or| read. T|
|00004520| 68 65 20 61 63 63 65 73 | 73 6f 72 20 6d 65 74 68 |he acces|sor meth|
|00004530| 6f 64 20 63 61 6e 20 65 | 6e 63 61 70 73 75 6c 61 |od can e|ncapsula|
|00004540| 74 65 20 61 6c 6c 20 6b | 69 6e 64 73 20 6f 66 20 |te all k|inds of |
|00004550| 63 6f 6d 70 6c 65 78 20 | 62 65 68 61 76 69 6f 72 |complex |behavior|
|00004560| 20 66 6f 72 20 61 20 63 | 6f 6d 70 6f 6e 65 6e 74 | for a c|omponent|
|00004570| 3b 20 61 6c 6c 20 74 68 | 65 20 63 6f 6d 70 6f 6e |; all th|e compon|
|00004580| 65 6e 74 20 75 73 65 72 | 20 6e 65 65 64 73 20 74 |ent user| needs t|
|00004590| 6f 20 6b 6e 6f 77 20 69 | 73 20 68 6f 77 20 74 6f |o know i|s how to|
|000045a0| 20 6d 61 6b 65 20 61 20 | 6d 65 74 68 6f 64 20 63 | make a |method c|
|000045b0| 61 6c 6c 2e 0d 0a 3c 2f | 55 4c 3e 0d 0a 0d 0a 3c |all...</|UL>....<|
|000045c0| 41 20 4e 41 4d 45 3d 22 | 70 72 6f 70 65 72 74 79 |A NAME="|property|
|000045d0| 64 61 74 61 61 63 63 65 | 73 73 22 3e 3c 2f 41 3e |dataacce|ss"></A>|
|000045e0| 0d 0a 41 20 70 72 6f 70 | 65 72 74 79 20 6d 75 73 |..A prop|erty mus|
|000045f0| 74 20 68 61 76 65 20 61 | 70 70 72 6f 70 72 69 61 |t have a|ppropria|
|00004600| 74 65 6c 79 20 6e 61 6d | 65 64 20 61 63 63 65 73 |tely nam|ed acces|
|00004610| 73 6f 72 20 6d 65 74 68 | 6f 64 73 20 64 65 66 69 |sor meth|ods defi|
|00004620| 6e 65 64 20 69 6e 20 74 | 68 65 20 63 6f 6d 70 6f |ned in t|he compo|
|00004630| 6e 65 6e 74 2e 20 49 74 | 20 6e 65 65 64 20 6e 6f |nent. It| need no|
|00004640| 74 20 68 61 76 65 20 61 | 20 63 6c 61 73 73 20 64 |t have a| class d|
|00004650| 61 74 61 20 6d 65 6d 62 | 65 72 20 61 73 73 6f 63 |ata memb|er assoc|
|00004660| 69 61 74 65 64 20 77 69 | 74 68 20 69 74 2c 20 61 |iated wi|th it, a|
|00004670| 73 20 73 6f 6d 65 74 69 | 6d 65 73 20 74 68 65 72 |s someti|mes ther|
|00004680| 65 20 69 73 6e 27 74 20 | 61 20 6f 6e 65 2d 74 6f |e isn't |a one-to|
|00004690| 2d 6f 6e 65 20 72 65 6c | 61 74 69 6f 6e 20 62 65 |-one rel|ation be|
|000046a0| 74 77 65 65 6e 20 61 20 | 63 6f 6d 70 6f 6e 65 6e |tween a |componen|
|000046b0| 74 20 63 6c 61 73 73 20 | 64 61 74 61 20 6d 65 6d |t class |data mem|
|000046c0| 62 65 72 20 61 6e 64 20 | 61 20 67 69 76 65 6e 20 |ber and |a given |
|000046d0| 63 6f 6d 70 6f 6e 65 6e | 74 20 70 72 6f 70 65 72 |componen|t proper|
|000046e0| 74 79 2e 20 46 6f 72 20 | 65 78 61 6d 70 6c 65 2c |ty. For |example,|
|000046f0| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 63 | the fol|lowing c|
|00004700| 6f 64 65 20 66 72 61 67 | 6d 65 6e 74 20 64 65 66 |ode frag|ment def|
|00004710| 69 6e 65 73 20 61 20 63 | 6f 6d 70 6f 6e 65 6e 74 |ines a c|omponent|
|00004720| 20 70 72 6f 70 65 72 74 | 79 20 63 61 6c 6c 65 64 | propert|y called|
|00004730| 20 3c 65 6d 3e 73 68 61 | 64 6f 77 43 6f 6c 6f 72 | <em>sha|dowColor|
|00004740| 3a 3c 2f 65 6d 3e 0d 0a | 0d 0a 3c 50 52 45 3e 0d |:</em>..|..<PRE>.|
|00004750| 0a 3c 73 74 72 6f 6e 67 | 3e 70 75 62 6c 69 63 20 |.<strong|>public |
|00004760| 63 6c 61 73 73 3c 2f 73 | 74 72 6f 6e 67 3e 20 4d |class</s|trong> M|
|00004770| 79 43 6f 6d 70 6f 6e 65 | 6e 74 20 3c 73 74 72 6f |yCompone|nt <stro|
|00004780| 6e 67 3e 65 78 74 65 6e | 64 73 3c 2f 73 74 72 6f |ng>exten|ds</stro|
|00004790| 6e 67 3e 20 42 65 76 65 | 6c 50 61 6e 65 6c 20 7b |ng> Beve|lPanel {|
|000047a0| 0d 0a 20 20 20 20 20 3c | 73 74 72 6f 6e 67 3e 70 |.. <|strong>p|
|000047b0| 72 69 76 61 74 65 20 69 | 6e 74 3c 2f 73 74 72 6f |rivate i|nt</stro|
|000047c0| 6e 67 3e 20 72 65 64 56 | 61 6c 75 65 3b 0d 0a 20 |ng> redV|alue;.. |
|000047d0| 20 20 20 20 3c 73 74 72 | 6f 6e 67 3e 70 72 69 76 | <str|ong>priv|
|000047e0| 61 74 65 20 69 6e 74 3c | 2f 73 74 72 6f 6e 67 3e |ate int<|/strong>|
|000047f0| 20 67 72 65 65 6e 56 61 | 6c 75 65 3b 0d 0a 20 20 | greenVa|lue;.. |
|00004800| 20 20 20 3c 73 74 72 6f | 6e 67 3e 70 72 69 76 61 | <stro|ng>priva|
|00004810| 74 65 20 69 6e 74 3c 2f | 73 74 72 6f 6e 67 3e 20 |te int</|strong> |
|00004820| 62 6c 75 65 56 61 6c 75 | 65 3b 0d 0a 0d 0a 20 20 |blueValu|e;.... |
|00004830| 20 20 3c 73 74 72 6f 6e | 67 3e 70 75 62 6c 69 63 | <stron|g>public|
|00004840| 20 69 6e 74 3c 2f 73 74 | 72 6f 6e 67 3e 20 67 65 | int</st|rong> ge|
|00004850| 74 53 68 61 64 6f 77 43 | 6f 6c 6f 72 28 29 20 20 |tShadowC|olor() |
|00004860| 7b 0d 0a 20 20 20 20 20 | 20 20 20 3c 73 74 72 6f |{.. | <stro|
|00004870| 6e 67 3e 72 65 74 75 72 | 6e 3c 2f 73 74 72 6f 6e |ng>retur|n</stron|
|00004880| 67 3e 20 72 65 64 56 61 | 6c 75 65 20 7c 20 67 72 |g> redVa|lue | gr|
|00004890| 65 65 6e 56 61 6c 75 65 | 20 7c 20 62 6c 75 65 56 |eenValue| | blueV|
|000048a0| 61 6c 75 65 3b 0d 0a 20 | 20 20 20 20 7d 0d 0a 0d |alue;.. | }...|
|000048b0| 0a 20 20 20 20 3c 73 74 | 72 6f 6e 67 3e 70 75 62 |. <st|rong>pub|
|000048c0| 6c 69 63 20 76 6f 69 64 | 3c 2f 73 74 72 6f 6e 67 |lic void|</strong|
|000048d0| 3e 20 73 65 74 53 68 61 | 64 6f 77 43 6f 6c 6f 72 |> setSha|dowColor|
|000048e0| 28 3c 73 74 72 6f 6e 67 | 3e 69 6e 74 3c 2f 73 74 |(<strong|>int</st|
|000048f0| 72 6f 6e 67 3e 20 63 6f | 6c 6f 72 29 20 20 7b 0d |rong> co|lor) {.|
|00004900| 0a 20 20 20 20 20 20 20 | 20 20 72 65 64 56 61 6c |. | redVal|
|00004910| 75 65 20 3d 20 63 6f 6c | 6f 72 20 26 61 6d 70 3b |ue = col|or &amp;|
|00004920| 20 30 78 66 66 30 30 30 | 30 3b 20 20 20 20 20 20 | 0xff000|0; |
|00004930| 20 20 20 2f 2f 20 63 6c | 61 73 73 20 64 61 74 61 | // cl|ass data|
|00004940| 20 6d 65 6d 62 65 72 73 | 0d 0a 20 20 20 20 20 20 | members|.. |
|00004950| 20 20 20 67 72 65 65 6e | 56 61 6c 75 65 20 3d 20 | green|Value = |
|00004960| 63 6f 6c 6f 72 20 26 61 | 6d 70 3b 20 30 78 30 30 |color &a|mp; 0x00|
|00004970| 46 46 30 30 3b 0d 0a 20 | 20 20 20 20 20 20 20 20 |FF00;.. | |
|00004980| 62 6c 75 65 56 61 6c 75 | 65 20 3d 20 63 6f 6c 6f |blueValu|e = colo|
|00004990| 72 20 26 61 6d 70 3b 20 | 30 78 30 30 30 30 46 46 |r &amp; |0x0000FF|
|000049a0| 3b 0d 0a 20 20 20 20 7d | 0d 0a 7d 0d 0a 3c 2f 50 |;.. }|..}..</P|
|000049b0| 52 45 3e 0d 0a 0d 0a 41 | 6c 74 68 6f 75 67 68 20 |RE>....A|lthough |
|000049c0| 3c 65 6d 3e 4d 79 43 6f | 6d 70 6f 6e 65 6e 74 3c |<em>MyCo|mponent<|
|000049d0| 2f 65 6d 3e 20 68 61 73 | 20 6e 6f 20 61 63 74 75 |/em> has| no actu|
|000049e0| 61 6c 20 63 6c 61 73 73 | 20 64 61 74 61 20 6d 65 |al class| data me|
|000049f0| 6d 62 65 72 20 6e 61 6d | 65 64 20 3c 65 6d 3e 73 |mber nam|ed <em>s|
|00004a00| 68 61 64 6f 77 43 6f 6c | 6f 72 3c 2f 65 6d 3e 2c |hadowCol|or</em>,|
|00004a10| 20 74 68 65 20 70 72 6f | 70 65 72 74 79 20 69 73 | the pro|perty is|
|00004a20| 20 63 6f 72 72 65 63 74 | 6c 79 20 64 65 66 69 6e | correct|ly defin|
|00004a30| 65 64 20 62 65 63 61 75 | 73 65 20 6f 66 20 74 68 |ed becau|se of th|
|00004a40| 65 20 74 77 6f 20 61 63 | 63 65 73 73 6f 72 20 6d |e two ac|cessor m|
|00004a50| 65 74 68 6f 64 73 2c 20 | 3c 65 6d 3e 67 65 74 53 |ethods, |<em>getS|
|00004a60| 68 61 64 6f 77 43 6f 6c | 6f 72 28 29 3c 2f 65 6d |hadowCol|or()</em|
|00004a70| 3e 20 61 6e 64 20 3c 65 | 6d 3e 73 65 74 53 68 61 |> and <e|m>setSha|
|00004a80| 64 6f 77 43 6f 6c 6f 72 | 28 29 3c 2f 65 6d 3e 2e |dowColor|()</em>.|
|00004a90| 20 54 68 65 73 65 20 6d | 65 74 68 6f 64 73 20 77 | These m|ethods w|
|00004aa0| 72 69 74 65 20 61 6e 64 | 20 72 65 61 64 20 74 68 |rite and| read th|
|00004ab0| 72 65 65 20 76 61 72 69 | 61 62 6c 65 73 20 61 6e |ree vari|ables an|
|00004ac0| 64 20 63 61 6c 63 75 6c | 61 74 65 20 61 20 76 61 |d calcul|ate a va|
|00004ad0| 6c 75 65 20 66 6f 72 20 | 74 68 65 20 70 72 6f 70 |lue for |the prop|
|00004ae0| 65 72 74 79 2e 20 41 6c | 74 68 6f 75 67 68 20 69 |erty. Al|though i|
|00004af0| 74 27 73 20 63 6f 6d 6d | 6f 6e 20 66 6f 72 20 61 |t's comm|on for a|
|00004b00| 20 63 6f 6d 70 6f 6e 65 | 6e 74 20 70 72 6f 70 65 | compone|nt prope|
|00004b10| 72 74 79 20 74 6f 20 73 | 65 74 20 61 20 76 61 72 |rty to s|et a var|
|00004b20| 69 61 62 6c 65 20 77 69 | 74 68 20 74 68 65 20 73 |iable wi|th the s|
|00004b30| 61 6d 65 20 6e 61 6d 65 | 20 61 73 20 74 68 65 20 |ame name| as the |
|00004b40| 70 72 6f 70 65 72 74 79 | 20 69 74 73 65 6c 66 2c |property| itself,|
|00004b50| 20 69 74 20 69 73 20 6e | 6f 74 20 72 65 71 75 69 | it is n|ot requi|
|00004b60| 72 65 64 2e 20 54 68 65 | 20 63 6f 6d 70 6f 6e 65 |red. The| compone|
|00004b70| 6e 74 20 70 72 6f 70 65 | 72 74 79 20 6d 75 73 74 |nt prope|rty must|
|00004b80| 20 6d 65 72 65 6c 79 20 | 68 61 76 65 20 63 6f 72 | merely |have cor|
|00004b90| 72 65 63 74 6c 79 20 64 | 65 63 6c 61 72 65 64 20 |rectly d|eclared |
|00004ba0| 70 72 6f 70 65 72 74 79 | 20 61 63 63 65 73 73 6f |property| accesso|
|00004bb0| 72 20 6d 65 74 68 6f 64 | 73 20 66 6f 72 20 74 68 |r method|s for th|
|00004bc0| 65 20 70 72 6f 70 65 72 | 74 79 20 74 6f 20 62 65 |e proper|ty to be|
|00004bd0| 20 76 61 6c 69 64 2e 0d | 0a 0d 0a 3c 50 3e 3c 41 | valid..|...<P><A|
|00004be0| 20 48 52 45 46 3d 22 70 | 72 6f 70 65 72 74 69 65 | HREF="p|ropertie|
|00004bf0| 73 2e 68 74 6d 6c 22 3e | 43 72 65 61 74 69 6e 67 |s.html">|Creating|
|00004c00| 20 70 72 6f 70 65 72 74 | 69 65 73 3c 2f 41 3e 20 | propert|ies</A> |
|00004c10| 65 78 70 6c 61 69 6e 73 | 20 68 6f 77 20 74 6f 20 |explains| how to |
|00004c20| 61 64 64 0d 0a 70 72 6f | 70 65 72 74 69 65 73 20 |add..pro|perties |
|00004c30| 74 6f 20 79 6f 75 72 20 | 63 6f 6d 70 6f 6e 65 6e |to your |componen|
|00004c40| 74 73 2e 0d 0a 0d 0a 3c | 41 20 4e 41 4d 45 3d 22 |ts.....<|A NAME="|
|00004c50| 63 6f 6d 70 6f 6e 65 6e | 74 6d 65 74 68 6f 64 73 |componen|tmethods|
|00004c60| 22 3e 3c 2f 41 3e 0d 0a | 3c 48 33 3e 43 6f 6d 70 |"></A>..|<H3>Comp|
|00004c70| 6f 6e 65 6e 74 20 6d 65 | 74 68 6f 64 73 3c 2f 48 |onent me|thods</H|
|00004c80| 33 3e 0d 0a 3c 21 2d 2d | 42 4e 44 58 3d 22 6d 65 |3>..<!--|BNDX="me|
|00004c90| 74 68 6f 64 73 3b 6e 61 | 6d 69 6e 67 20 6d 65 74 |thods;na|ming met|
|00004ca0| 68 6f 64 73 22 2d 2d 3e | 0d 0a 0d 0a 43 6f 6d 70 |hods"-->|....Comp|
|00004cb0| 6f 6e 65 6e 74 20 3c 65 | 6d 3e 6d 65 74 68 6f 64 |onent <e|m>method|
|00004cc0| 73 3c 2f 65 6d 3e 20 65 | 6e 63 61 70 73 75 6c 61 |s</em> e|ncapsula|
|00004cd0| 74 65 0d 0a 74 68 65 20 | 62 65 68 61 76 69 6f 72 |te..the |behavior|
|00004ce0| 20 6f 66 20 74 68 65 20 | 63 6f 6d 70 6f 6e 65 6e | of the |componen|
|00004cf0| 74 2e 20 54 68 65 79 20 | 61 72 65 20 73 74 61 6e |t. They |are stan|
|00004d00| 64 61 72 64 20 4a 61 76 | 61 20 6d 65 74 68 6f 64 |dard Jav|a method|
|00004d10| 73 20 77 68 69 63 68 20 | 63 61 6e 0d 0a 62 65 20 |s which |can..be |
|00004d20| 63 61 6c 6c 65 64 20 66 | 72 6f 6d 20 6f 74 68 65 |called f|rom othe|
|00004d30| 72 20 63 6f 6d 70 6f 6e | 65 6e 74 73 2e 20 43 6f |r compon|ents. Co|
|00004d40| 6d 70 6f 6e 65 6e 74 20 | 6d 65 74 68 6f 64 73 20 |mponent |methods |
|00004d50| 61 72 65 20 61 76 61 69 | 6c 61 62 6c 65 20 61 74 |are avai|lable at|
|00004d60| 20 72 75 6e 74 69 6d 65 | 20 6f 6e 6c 79 2e 0d 0a | runtime| only...|
|00004d70| 0d 0a 3c 50 3e 54 68 65 | 72 65 20 61 72 65 20 66 |..<P>The|re are f|
|00004d80| 65 77 20 72 65 73 74 72 | 69 63 74 69 6f 6e 73 20 |ew restr|ictions |
|00004d90| 6f 6e 20 77 68 61 74 20 | 63 6f 6d 70 6f 6e 65 6e |on what |componen|
|00004da0| 74 20 6d 65 74 68 6f 64 | 73 20 63 61 6e 20 64 6f |t method|s can do|
|00004db0| 2c 20 62 75 74 20 79 6f | 75 20 73 68 6f 75 6c 64 |, but yo|u should|
|00004dc0| 20 6d 61 6b 65 20 65 76 | 65 72 79 20 65 66 66 6f | make ev|ery effo|
|00004dd0| 72 74 20 74 6f 20 65 6e | 73 75 72 65 20 74 68 61 |rt to en|sure tha|
|00004de0| 74 20 79 6f 75 72 20 6d | 65 74 68 6f 64 73 20 61 |t your m|ethods a|
|00004df0| 72 65 20 61 73 20 69 6e | 74 75 69 74 69 76 65 20 |re as in|tuitive |
|00004e00| 61 73 20 70 6f 73 73 69 | 62 6c 65 2e 20 4e 61 6d |as possi|ble. Nam|
|00004e10| 65 20 79 6f 75 72 20 6d | 65 74 68 6f 64 73 20 73 |e your m|ethods s|
|00004e20| 6f 20 74 68 61 74 20 74 | 68 65 20 70 75 72 70 6f |o that t|he purpo|
|00004e30| 73 65 20 6f 66 20 74 68 | 65 20 6d 65 74 68 6f 64 |se of th|e method|
|00004e40| 20 69 73 20 6f 62 76 69 | 6f 75 73 2e 20 41 76 6f | is obvi|ous. Avo|
|00004e50| 69 64 20 70 72 65 63 6f | 6e 64 69 74 69 6f 6e 73 |id preco|nditions|
|00004e60| 20 6f 6e 20 6d 65 74 68 | 6f 64 20 75 73 65 2e 20 | on meth|od use. |
|00004e70| 49 66 20 79 6f 75 20 6d | 75 73 74 20 68 61 76 65 |If you m|ust have|
|00004e80| 20 70 72 65 63 6f 6e 64 | 69 74 69 6f 6e 73 20 6f | precond|itions o|
|00004e90| 6e 20 61 20 6d 65 74 68 | 6f 64 20 63 61 6c 6c 2c |n a meth|od call,|
|00004ea0| 20 62 75 69 6c 64 20 69 | 6e 0d 0a 74 65 73 74 73 | build i|n..tests|
|00004eb0| 20 74 6f 20 76 61 6c 69 | 64 61 74 65 20 74 68 61 | to vali|date tha|
|00004ec0| 74 20 63 6f 6e 64 69 74 | 69 6f 6e 73 20 61 72 65 |t condit|ions are|
|00004ed0| 20 6d 65 74 20 61 6e 64 | 20 70 72 6f 76 69 64 65 | met and| provide|
|00004ee0| 20 65 78 63 65 70 74 69 | 6f 6e 20 68 61 6e 64 6c | excepti|on handl|
|00004ef0| 69 6e 67 0d 0a 66 6f 72 | 20 73 69 74 75 61 74 69 |ing..for| situati|
|00004f00| 6f 6e 73 20 77 68 65 72 | 65 20 61 20 6d 65 74 68 |ons wher|e a meth|
|00004f10| 6f 64 20 63 61 6c 6c 20 | 69 73 20 69 6e 61 70 70 |od call |is inapp|
|00004f20| 72 6f 70 72 69 61 74 65 | 2e 0d 0a 0d 0a 3c 50 3e |ropriate|.....<P>|
|00004f30| 54 61 6b 65 20 63 61 72 | 65 20 69 6e 20 74 68 65 |Take car|e in the|
|00004f40| 20 6e 61 6d 69 6e 67 20 | 6f 66 20 6d 65 74 68 6f | naming |of metho|
|00004f50| 64 73 20 74 6f 20 6d 61 | 6b 65 20 79 6f 75 72 20 |ds to ma|ke your |
|00004f60| 63 6f 6d 70 6f 6e 65 6e | 74 73 20 65 61 73 69 65 |componen|ts easie|
|00004f70| 72 20 74 6f 0d 0a 75 73 | 65 2e 20 43 68 6f 6f 73 |r to..us|e. Choos|
|00004f80| 65 20 74 68 65 20 73 68 | 6f 72 74 65 73 74 20 64 |e the sh|ortest d|
|00004f90| 65 73 63 72 69 70 74 69 | 76 65 20 6e 61 6d 65 2e |escripti|ve name.|
|00004fa0| 20 41 76 6f 69 64 20 61 | 62 62 72 65 76 69 61 74 | Avoid a|bbreviat|
|00004fb0| 69 6e 67 0d 0a 6d 65 74 | 68 6f 64 20 6e 61 6d 65 |ing..met|hod name|
|00004fc0| 73 2e 20 52 65 6d 65 6d | 62 65 72 2c 20 74 6f 6f |s. Remem|ber, too|
|00004fd0| 2c 20 74 68 61 74 20 6d | 65 74 68 6f 64 73 20 61 |, that m|ethods a|
|00004fe0| 72 65 20 61 63 74 69 6f | 6e 73 2e 20 49 66 20 79 |re actio|ns. If y|
|00004ff0| 6f 75 20 66 69 6e 64 20 | 79 6f 75 72 73 65 6c 66 |ou find |yourself|
|00005000| 0d 0a 63 72 65 61 74 69 | 6e 67 20 6d 61 6e 79 20 |..creati|ng many |
|00005010| 6d 65 74 68 6f 64 73 20 | 74 68 61 74 20 68 61 76 |methods |that hav|
|00005020| 65 20 6e 6f 20 76 65 72 | 62 73 20 69 6e 20 74 68 |e no ver|bs in th|
|00005030| 65 69 72 20 6e 61 6d 65 | 73 2c 20 63 6f 6e 73 69 |eir name|s, consi|
|00005040| 64 65 72 20 63 72 65 61 | 74 69 6e 67 0d 0a 70 72 |der crea|ting..pr|
|00005050| 6f 70 65 72 74 69 65 73 | 20 69 6e 73 74 65 61 64 |operties| instead|
|00005060| 2e 20 44 6f 20 6e 6f 74 | 20 69 6e 63 6c 75 64 65 |. Do not| include|
|00005070| 20 74 68 65 20 64 61 74 | 61 20 74 79 70 65 20 6f | the dat|a type o|
|00005080| 66 20 61 72 67 75 6d 65 | 6e 74 73 20 69 6e 20 74 |f argume|nts in t|
|00005090| 68 65 20 6d 65 74 68 6f | 64 0d 0a 6e 61 6d 65 2e |he metho|d..name.|
|000050a0| 20 49 6e 73 74 65 61 64 | 20 6e 61 6d 65 20 6d 65 | Instead| name me|
|000050b0| 74 68 6f 64 73 20 61 6e | 64 20 61 72 67 75 6d 65 |thods an|d argume|
|000050c0| 6e 74 73 20 73 6f 20 74 | 68 61 74 20 74 68 65 20 |nts so t|hat the |
|000050d0| 6d 65 74 68 6f 64 20 73 | 69 67 6e 61 74 75 72 65 |method s|ignature|
|000050e0| 20 70 72 6f 76 69 64 65 | 73 0d 0a 61 20 63 6f 6d | provide|s..a com|
|000050f0| 70 6c 65 74 65 20 62 75 | 74 20 6e 6f 6e 2d 72 65 |plete bu|t non-re|
|00005100| 64 75 6e 64 61 6e 74 20 | 64 65 73 63 72 69 70 74 |dundant |descript|
|00005110| 69 6f 6e 20 6f 66 20 74 | 68 65 20 61 63 74 69 6f |ion of t|he actio|
|00005120| 6e 2e 20 46 6f 72 20 65 | 78 61 6d 70 6c 65 2c 20 |n. For e|xample, |
|00005130| 3c 54 54 3e 3c 73 74 72 | 6f 6e 67 3e 76 6f 69 64 |<TT><str|ong>void|
|00005140| 3c 2f 73 74 72 6f 6e 67 | 3e 0d 0a 70 61 73 74 65 |</strong|>..paste|
|00005150| 28 49 6d 61 67 65 29 3c | 2f 54 54 3e 20 74 65 6c |(Image)<|/TT> tel|
|00005160| 6c 73 20 79 6f 75 20 65 | 76 65 72 79 74 68 69 6e |ls you e|verythin|
|00005170| 67 20 79 6f 75 20 6e 65 | 65 64 20 74 6f 20 75 73 |g you ne|ed to us|
|00005180| 65 20 74 68 69 73 20 3c | 65 6d 3e 70 61 73 74 65 |e this <|em>paste|
|00005190| 28 29 3c 2f 65 6d 3e 0d | 0a 6d 65 74 68 6f 64 2e |()</em>.|.method.|
|000051a0| 20 42 79 20 63 6f 6e 74 | 72 61 73 74 2c 20 3c 54 | By cont|rast, <T|
|000051b0| 54 3e 3c 73 74 72 6f 6e | 67 3e 76 6f 69 64 3c 2f |T><stron|g>void</|
|000051c0| 73 74 72 6f 6e 67 3e 20 | 70 61 73 74 65 49 6d 61 |strong> |pasteIma|
|000051d0| 67 65 28 49 6d 61 67 65 | 29 3c 2f 54 54 3e 20 69 |ge(Image|)</TT> i|
|000051e0| 73 20 72 65 64 75 6e 64 | 61 6e 74 0d 0a 61 6e 64 |s redund|ant..and|
|000051f0| 20 76 69 73 75 61 6c 6c | 79 20 63 6f 6e 66 75 73 | visuall|y confus|
|00005200| 69 6e 67 2e 0d 0a 0d 0a | 3c 41 20 4e 41 4d 45 3d |ing.....|<A NAME=|
|00005210| 22 63 6f 6d 70 6f 6e 65 | 6e 74 65 76 65 6e 74 73 |"compone|ntevents|
|00005220| 22 3e 3c 2f 41 3e 0d 0a | 3c 48 33 3e 43 6f 6d 70 |"></A>..|<H3>Comp|
|00005230| 6f 6e 65 6e 74 20 65 76 | 65 6e 74 73 3c 2f 48 33 |onent ev|ents</H3|
|00005240| 3e 0d 0a 3c 21 2d 2d 42 | 4e 44 58 3d 22 65 76 65 |>..<!--B|NDX="eve|
|00005250| 6e 74 73 3b 65 76 65 6e | 74 20 6c 69 73 74 65 6e |nts;even|t listen|
|00005260| 65 72 73 3b 65 76 65 6e | 74 20 73 6f 75 72 63 65 |ers;even|t source|
|00005270| 73 22 2d 2d 3e 0d 0a 0d | 0a 3c 65 6d 3e 45 76 65 |s"-->...|.<em>Eve|
|00005280| 6e 74 73 3c 2f 65 6d 3e | 20 61 6c 6c 6f 77 20 63 |nts</em>| allow c|
|00005290| 6f 6d 70 6f 6e 65 6e 74 | 73 0d 0a 74 6f 20 72 65 |omponent|s..to re|
|000052a0| 63 65 69 76 65 20 69 6e | 70 75 74 20 61 6e 64 20 |ceive in|put and |
|000052b0| 66 65 65 64 62 61 63 6b | 20 66 72 6f 6d 20 74 68 |feedback| from th|
|000052c0| 65 20 75 73 65 72 20 61 | 74 20 72 75 6e 74 69 6d |e user a|t runtim|
|000052d0| 65 2e 20 54 68 65 79 20 | 63 6f 6e 6e 65 63 74 20 |e. They |connect |
|000052e0| 6f 63 63 75 72 72 65 6e | 63 65 73 0d 0a 69 6e 20 |occurren|ces..in |
|000052f0| 61 20 63 6f 6d 70 6f 6e | 65 6e 74 20 28 73 75 63 |a compon|ent (suc|
|00005300| 68 20 61 73 20 6d 6f 75 | 73 65 20 61 63 74 69 6f |h as mou|se actio|
|00005310| 6e 73 2c 20 6b 65 79 73 | 74 72 6f 6b 65 73 2c 20 |ns, keys|trokes, |
|00005320| 61 6e 64 20 70 72 6f 70 | 65 72 74 79 20 73 74 61 |and prop|erty sta|
|00005330| 74 65 20 63 68 61 6e 67 | 65 73 29 0d 0a 77 69 74 |te chang|es)..wit|
|00005340| 68 20 74 68 65 20 63 6f | 64 65 20 77 72 69 74 74 |h the co|de writt|
|00005350| 65 6e 20 62 79 20 63 6f | 6d 70 6f 6e 65 6e 74 20 |en by co|mponent |
|00005360| 75 73 65 72 73 20 28 65 | 76 65 6e 74 20 6c 69 73 |users (e|vent lis|
|00005370| 74 65 6e 65 72 73 29 2e | 20 54 68 65 20 4a 61 76 |teners).| The Jav|
|00005380| 61 42 65 61 6e 73 20 73 | 70 65 63 69 66 69 63 61 |aBeans s|pecifica|
|00005390| 74 69 6f 6e 20 64 65 66 | 69 6e 65 73 20 72 75 6c |tion def|ines rul|
|000053a0| 65 73 20 74 68 61 74 20 | 61 6c 6c 6f 77 20 63 6f |es that |allow co|
|000053b0| 6d 70 6f 6e 65 6e 74 73 | 20 74 6f 20 62 6f 74 68 |mponents| to both|
|000053c0| 20 67 65 6e 65 72 61 74 | 65 20 61 6e 64 20 72 65 | generat|e and re|
|000053d0| 73 70 6f 6e 64 20 74 6f | 20 65 76 65 6e 74 73 20 |spond to| events |
|000053e0| 77 69 74 68 69 6e 20 61 | 20 70 72 6f 67 72 61 6d |within a| program|
|000053f0| 2e 20 41 20 63 6f 6d 70 | 6f 6e 65 6e 74 20 74 68 |. A comp|onent th|
|00005400| 61 74 20 67 65 6e 65 72 | 61 74 65 73 20 65 76 65 |at gener|ates eve|
|00005410| 6e 74 73 20 69 73 20 61 | 20 3c 65 6d 3e 73 6f 75 |nts is a| <em>sou|
|00005420| 72 63 65 3c 2f 65 6d 3e | 20 63 6f 6d 70 6f 6e 65 |rce</em>| compone|
|00005430| 6e 74 3b 20 61 20 63 6f | 6d 70 6f 6e 65 6e 74 20 |nt; a co|mponent |
|00005440| 74 68 61 74 20 72 65 73 | 70 6f 6e 64 73 20 74 6f |that res|ponds to|
|00005450| 20 65 76 65 6e 74 20 6f | 63 63 75 72 72 65 6e 63 | event o|ccurrenc|
|00005460| 65 73 20 69 73 20 61 20 | 3c 65 6d 3e 6c 69 73 74 |es is a |<em>list|
|00005470| 65 6e 65 72 3c 2f 65 6d | 3e 2e 0d 0a 0d 0a 3c 50 |ener</em|>.....<P|
|00005480| 3e 49 66 20 61 20 63 6f | 6d 70 6f 6e 65 6e 74 27 |>If a co|mponent'|
|00005490| 73 20 63 6f 64 65 20 63 | 6f 6d 70 6c 69 65 73 20 |s code c|omplies |
|000054a0| 77 69 74 68 20 74 68 65 | 20 4a 61 76 61 42 65 61 |with the| JavaBea|
|000054b0| 6e 73 20 72 75 6c 65 73 | 2c 20 4a 42 75 69 6c 64 |ns rules|, JBuild|
|000054c0| 65 72 20 72 65 63 6f 67 | 6e 69 7a 65 73 20 74 68 |er recog|nizes th|
|000054d0| 65 20 63 6f 6d 70 6f 6e | 65 6e 74 27 73 20 65 76 |e compon|ent's ev|
|000054e0| 65 6e 74 73 20 61 6e 64 | 20 64 69 73 70 6c 61 79 |ents and| display|
|000054f0| 73 20 74 68 65 6d 20 69 | 6e 20 74 68 65 20 43 6f |s them i|n the Co|
|00005500| 6d 70 6f 6e 65 6e 74 20 | 49 6e 73 70 65 63 74 6f |mponent |Inspecto|
|00005510| 72 2e 20 0d 0a 0d 0a 3c | 50 3e 45 76 65 6e 74 20 |r. ....<|P>Event |
|00005520| 73 6f 75 72 63 65 20 63 | 6f 6d 70 6f 6e 65 6e 74 |source c|omponent|
|00005530| 73 20 68 61 76 65 20 72 | 65 67 69 73 74 72 61 74 |s have r|egistrat|
|00005540| 69 6f 6e 20 6d 65 74 68 | 6f 64 73 2c 20 77 68 69 |ion meth|ods, whi|
|00005550| 63 68 20 61 72 65 20 73 | 69 6d 69 6c 61 72 0d 0a |ch are s|imilar..|
|00005560| 69 6e 20 6e 61 6d 69 6e | 67 20 70 61 74 74 65 72 |in namin|g patter|
|00005570| 6e 73 20 74 6f 20 74 68 | 65 20 61 63 63 65 73 73 |ns to th|e access|
|00005580| 6f 72 20 6d 65 74 68 6f | 64 73 20 6f 66 20 70 72 |or metho|ds of pr|
|00005590| 6f 70 65 72 74 69 65 73 | 2e 20 3c 41 20 48 52 45 |operties|. <A HRE|
|000055a0| 46 3d 22 65 76 65 6e 74 | 73 2e 68 74 6d 6c 22 3e |F="event|s.html">|
|000055b0| 57 6f 72 6b 69 6e 67 0d | 0a 77 69 74 68 20 65 76 |Working.|.with ev|
|000055c0| 65 6e 74 73 3c 2f 41 3e | 20 65 78 70 6c 61 69 6e |ents</A>| explain|
|000055d0| 73 20 68 6f 77 20 74 6f | 20 61 64 64 20 73 74 61 |s how to| add sta|
|000055e0| 6e 64 61 72 64 20 65 76 | 65 6e 74 20 73 65 74 73 |ndard ev|ent sets|
|000055f0| 20 6f 72 20 65 76 65 6e | 74 20 73 65 74 73 20 79 | or even|t sets y|
|00005600| 6f 75 0d 0a 64 65 66 69 | 6e 65 20 79 6f 75 72 73 |ou..defi|ne yours|
|00005610| 65 6c 66 2e 0d 0a 0d 0a | 20 3c 41 20 4e 41 4d 45 |elf.....| <A NAME|
|00005620| 3d 22 73 74 64 4a 61 76 | 61 65 76 65 6e 74 73 22 |="stdJav|aevents"|
|00005630| 3e 3c 2f 41 3e 0d 0a 0d | 0a 3c 50 3e 53 74 61 6e |></A>...|.<P>Stan|
|00005640| 64 61 72 64 20 4a 61 76 | 61 20 65 76 65 6e 74 73 |dard Jav|a events|
|00005650| 20 61 72 65 20 67 72 6f | 75 70 65 64 20 6f 6e 20 | are gro|uped on |
|00005660| 6c 69 73 74 65 6e 65 72 | 20 69 6e 74 65 72 66 61 |listener| interfa|
|00005670| 63 65 73 20 28 61 6e 64 | 2c 20 69 6e 20 73 6f 6d |ces (and|, in som|
|00005680| 65 0d 0a 63 61 73 65 73 | 2c 20 6f 6e 20 73 6f 75 |e..cases|, on sou|
|00005690| 72 63 65 20 69 6e 74 65 | 72 66 61 63 65 73 29 2e |rce inte|rfaces).|
|000056a0| 20 54 68 65 73 65 20 61 | 72 65 20 74 68 65 20 73 | These a|re the s|
|000056b0| 74 61 6e 64 61 72 64 20 | 65 76 65 6e 74 20 73 65 |tandard |event se|
|000056c0| 74 73 20 61 6e 64 20 74 | 68 65 69 72 0d 0a 65 76 |ts and t|heir..ev|
|000056d0| 65 6e 74 73 3a 0d 0a 3c | 55 4c 3e 0d 0a 3c 4c 49 |ents:..<|UL>..<LI|
|000056e0| 3e 0d 0a 3c 41 20 48 52 | 45 46 3d 22 2e 2e 2f 2e |>..<A HR|EF="../.|
|000056f0| 2e 2f 6a 61 76 61 2f 61 | 70 69 2f 6a 61 76 61 2e |./java/a|pi/java.|
|00005700| 61 77 74 2e 65 76 65 6e | 74 2e 41 63 74 69 6f 6e |awt.even|t.Action|
|00005710| 4c 69 73 74 65 6e 65 72 | 2e 68 74 6d 6c 22 3e 41 |Listener|.html">A|
|00005720| 63 74 69 6f 6e 20 65 76 | 65 6e 74 73 3c 2f 41 3e |ction ev|ents</A>|
|00005730| 3c 2f 4c 49 3e 0d 0a 0d | 0a 3c 55 4c 3e 0d 0a 3c |</LI>...|.<UL>..<|
|00005740| 4c 49 3e 0d 0a 3c 65 6d | 3e 61 63 74 69 6f 6e 50 |LI>..<em|>actionP|
|00005750| 65 72 66 6f 72 6d 65 64 | 3c 2f 65 6d 3e 3c 2f 4c |erformed|</em></L|
|00005760| 49 3e 0d 0a 3c 2f 55 4c | 3e 0d 0a 0d 0a 3c 4c 49 |I>..</UL|>....<LI|
|00005770| 3e 0d 0a 3c 41 20 48 52 | 45 46 3d 22 2e 2e 2f 2e |>..<A HR|EF="../.|
|00005780| 2e 2f 6a 61 76 61 2f 61 | 70 69 2f 6a 61 76 61 2e |./java/a|pi/java.|
|00005790| 61 77 74 2e 65 76 65 6e | 74 2e 41 64 6a 75 73 74 |awt.even|t.Adjust|
|000057a0| 6d 65 6e 74 4c 69 73 74 | 65 6e 65 72 2e 68 74 6d |mentList|ener.htm|
|000057b0| 6c 22 3e 41 64 6a 75 73 | 74 6d 65 6e 74 0d 0a 65 |l">Adjus|tment..e|
|000057c0| 76 65 6e 74 73 3c 2f 41 | 3e 3c 2f 4c 49 3e 0d 0a |vents</A|></LI>..|
|000057d0| 0d 0a 3c 55 4c 3e 0d 0a | 3c 4c 49 3e 0d 0a 3c 65 |..<UL>..|<LI>..<e|
|000057e0| 6d 3e 61 64 6a 75 73 74 | 6d 65 6e 74 56 61 6c 75 |m>adjust|mentValu|
|000057f0| 65 43 68 61 6e 67 65 64 | 3c 2f 65 6d 3e 3c 2f 4c |eChanged|</em></L|
|00005800| 49 3e 0d 0a 3c 2f 55 4c | 3e 0d 0a 0d 0a 3c 4c 49 |I>..</UL|>....<LI|
|00005810| 3e 0d 0a 3c 41 20 48 52 | 45 46 3d 22 2e 2e 2f 2e |>..<A HR|EF="../.|
|00005820| 2e 2f 6a 61 76 61 2f 61 | 70 69 2f 6a 61 76 61 2e |./java/a|pi/java.|
|00005830| 61 77 74 2e 65 76 65 6e | 74 2e 43 6f 6d 70 6f 6e |awt.even|t.Compon|
|00005840| 65 6e 74 4c 69 73 74 65 | 6e 65 72 2e 68 74 6d 6c |entListe|ner.html|
|00005850| 22 3e 43 6f 6d 70 6f 6e | 65 6e 74 20 65 76 65 6e |">Compon|ent even|
|00005860| 74 73 3c 2f 41 3e 3c 2f | 4c 49 3e 0d 0a 0d 0a 3c |ts</A></|LI>....<|
|00005870| 55 4c 3e 0d 0a 3c 4c 49 | 3e 0d 0a 3c 65 6d 3e 63 |UL>..<LI|>..<em>c|
|00005880| 6f 6d 70 6f 6e 65 6e 74 | 48 69 64 64 65 6e 3c 2f |omponent|Hidden</|
|00005890| 65 6d 3e 3c 2f 4c 49 3e | 0d 0a 0d 0a 3c 4c 49 3e |em></LI>|....<LI>|
|000058a0| 0d 0a 3c 65 6d 3e 63 6f | 6d 70 6f 6e 65 6e 74 4d |..<em>co|mponentM|
|000058b0| 6f 76 65 64 3c 2f 65 6d | 3e 3c 2f 4c 49 3e 0d 0a |oved</em|></LI>..|
|000058c0| 0d 0a 3c 4c 49 3e 0d 0a | 3c 65 6d 3e 63 6f 6d 70 |..<LI>..|<em>comp|
|000058d0| 6f 6e 65 6e 74 52 65 73 | 69 7a 65 64 3c 2f 65 6d |onentRes|ized</em|
|000058e0| 3e 3c 2f 4c 49 3e 0d 0a | 0d 0a 3c 4c 49 3e 0d 0a |></LI>..|..<LI>..|
|000058f0| 3c 65 6d 3e 63 6f 6d 70 | 6f 6e 65 6e 74 53 68 6f |<em>comp|onentSho|
|00005900| 77 6e 3c 2f 65 6d 3e 3c | 2f 4c 49 3e 0d 0a 3c 2f |wn</em><|/LI>..</|
|00005910| 55 4c 3e 0d 0a 0d 0a 3c | 4c 49 3e 0d 0a 3c 41 20 |UL>....<|LI>..<A |
|00005920| 48 52 45 46 3d 22 2e 2e | 2f 2e 2e 2f 6a 61 76 61 |HREF="..|/../java|
|00005930| 2f 61 70 69 2f 6a 61 76 | 61 2e 61 77 74 2e 65 76 |/api/jav|a.awt.ev|
|00005940| 65 6e 74 2e 43 6f 6e 74 | 61 69 6e 65 72 4c 69 73 |ent.Cont|ainerLis|
|00005950| 74 65 6e 65 72 2e 68 74 | 6d 6c 22 3e 43 6f 6d 70 |tener.ht|ml">Comp|
|00005960| 6f 6e 65 6e 74 20 65 76 | 65 6e 74 73 3c 2f 41 3e |onent ev|ents</A>|
|00005970| 3c 2f 4c 49 3e 0d 0a 0d | 0a 3c 55 4c 3e 0d 0a 3c |</LI>...|.<UL>..<|
|00005980| 4c 49 3e 0d 0a 3c 65 6d | 3e 63 6f 6d 70 6f 6e 65 |LI>..<em|>compone|
|00005990| 6e 74 41 64 64 65 64 3c | 2f 65 6d 3e 3c 2f 4c 49 |ntAdded<|/em></LI|
|000059a0| 3e 0d 0a 0d 0a 3c 4c 49 | 3e 0d 0a 3c 65 6d 3e 63 |>....<LI|>..<em>c|
|000059b0| 6f 6d 70 6f 6e 65 6e 74 | 52 65 6d 6f 76 65 64 3c |omponent|Removed<|
|000059c0| 2f 65 6d 3e 3c 2f 4c 49 | 3e 0d 0a 3c 2f 55 4c 3e |/em></LI|>..</UL>|
|000059d0| 0d 0a 0d 0a 0d 0a 3c 4c | 49 3e 0d 0a 3c 41 20 48 |......<L|I>..<A H|
|000059e0| 52 45 46 3d 22 2e 2e 2f | 2e 2e 2f 6a 61 76 61 2f |REF="../|../java/|
|000059f0| 61 70 69 2f 6a 61 76 61 | 2e 61 77 74 2e 65 76 65 |api/java|.awt.eve|
|00005a00| 6e 74 2e 46 6f 63 75 73 | 4c 69 73 74 65 6e 65 72 |nt.Focus|Listener|
|00005a10| 2e 68 74 6d 6c 22 3e 46 | 6f 63 75 73 20 65 76 65 |.html">F|ocus eve|
|00005a20| 6e 74 73 3c 2f 41 3e 3c | 2f 4c 49 3e 0d 0a 0d 0a |nts</A><|/LI>....|
|00005a30| 3c 55 4c 3e 0d 0a 3c 4c | 49 3e 0d 0a 3c 65 6d 3e |<UL>..<L|I>..<em>|
|00005a40| 66 6f 63 75 73 47 61 69 | 6e 65 64 3c 2f 65 6d 3e |focusGai|ned</em>|
|00005a50| 3c 2f 4c 49 3e 0d 0a 0d | 0a 3c 4c 49 3e 0d 0a 3c |</LI>...|.<LI>..<|
|00005a60| 65 6d 3e 66 6f 63 75 73 | 4c 6f 73 74 3c 2f 65 6d |em>focus|Lost</em|
|00005a70| 3e 3c 2f 4c 49 3e 0d 0a | 3c 2f 55 4c 3e 0d 0a 0d |></LI>..|</UL>...|
|00005a80| 0a 3c 4c 49 3e 0d 0a 3c | 41 20 48 52 45 46 3d 22 |.<LI>..<|A HREF="|
|00005a90| 2e 2e 2f 2e 2e 2f 6a 61 | 76 61 2f 61 70 69 2f 6a |../../ja|va/api/j|
|00005aa0| 61 76 61 2e 61 77 74 2e | 65 76 65 6e 74 2e 49 74 |ava.awt.|event.It|
|00005ab0| 65 6d 4c 69 73 74 65 6e | 65 72 2e 68 74 6d 6c 22 |emListen|er.html"|
|00005ac0| 3e 49 74 65 6d 20 65 76 | 65 6e 74 73 3c 2f 41 3e |>Item ev|ents</A>|
|00005ad0| 3c 2f 4c 49 3e 0d 0a 0d | 0a 3c 55 4c 3e 0d 0a 3c |</LI>...|.<UL>..<|
|00005ae0| 4c 49 3e 0d 0a 3c 65 6d | 3e 69 74 65 6d 53 74 61 |LI>..<em|>itemSta|
|00005af0| 74 65 43 68 61 6e 67 65 | 64 3c 2f 65 6d 3e 3c 2f |teChange|d</em></|
|00005b00| 4c 49 3e 0d 0a 3c 2f 55 | 4c 3e 0d 0a 0d 0a 3c 4c |LI>..</U|L>....<L|
|00005b10| 49 3e 0d 0a 3c 41 20 48 | 52 45 46 3d 22 2e 2e 2f |I>..<A H|REF="../|
|00005b20| 2e 2e 2f 6a 61 76 61 2f | 61 70 69 2f 6a 61 76 61 |../java/|api/java|
|00005b30| 2e 61 77 74 2e 65 76 65 | 6e 74 2e 4b 65 79 4c 69 |.awt.eve|nt.KeyLi|
|00005b40| 73 74 65 6e 65 72 2e 68 | 74 6d 6c 22 3e 4b 65 79 |stener.h|tml">Key|
|00005b50| 20 65 76 65 6e 74 73 3c | 2f 41 3e 3c 2f 4c 49 3e | events<|/A></LI>|
|00005b60| 0d 0a 0d 0a 3c 55 4c 3e | 0d 0a 3c 4c 49 3e 0d 0a |....<UL>|..<LI>..|
|00005b70| 3c 65 6d 3e 6b 65 79 50 | 72 65 73 73 65 64 3c 2f |<em>keyP|ressed</|
|00005b80| 65 6d 3e 3c 2f 4c 49 3e | 0d 0a 0d 0a 3c 4c 49 3e |em></LI>|....<LI>|
|00005b90| 0d 0a 3c 65 6d 3e 6b 65 | 79 52 65 6c 65 61 73 65 |..<em>ke|yRelease|
|00005ba0| 64 3c 2f 65 6d 3e 3c 2f | 4c 49 3e 0d 0a 0d 0a 3c |d</em></|LI>....<|
|00005bb0| 4c 49 3e 0d 0a 3c 65 6d | 3e 6b 65 79 54 79 70 65 |LI>..<em|>keyType|
|00005bc0| 64 3c 2f 65 6d 3e 3c 2f | 4c 49 3e 0d 0a 3c 2f 55 |d</em></|LI>..</U|
|00005bd0| 4c 3e 0d 0a 0d 0a 3c 4c | 49 3e 0d 0a 3c 41 20 48 |L>....<L|I>..<A H|
|00005be0| 52 45 46 3d 22 2e 2e 2f | 2e 2e 2f 6a 61 76 61 2f |REF="../|../java/|
|00005bf0| 61 70 69 2f 6a 61 76 61 | 2e 61 77 74 2e 65 76 65 |api/java|.awt.eve|
|00005c00| 6e 74 2e 4d 6f 75 73 65 | 4c 69 73 74 65 6e 65 72 |nt.Mouse|Listener|
|00005c10| 2e 68 74 6d 6c 22 3e 4d | 6f 75 73 65 20 65 76 65 |.html">M|ouse eve|
|00005c20| 6e 74 73 3c 2f 41 3e 3c | 2f 4c 49 3e 0d 0a 0d 0a |nts</A><|/LI>....|
|00005c30| 3c 55 4c 3e 0d 0a 3c 4c | 49 3e 0d 0a 3c 65 6d 3e |<UL>..<L|I>..<em>|
|00005c40| 6d 6f 75 73 65 43 6c 69 | 63 6b 65 64 3c 2f 65 6d |mouseCli|cked</em|
|00005c50| 3e 3c 2f 4c 49 3e 0d 0a | 0d 0a 3c 4c 49 3e 0d 0a |></LI>..|..<LI>..|
|00005c60| 3c 65 6d 3e 6d 6f 75 73 | 65 45 6e 74 65 72 65 64 |<em>mous|eEntered|
|00005c70| 3c 2f 65 6d 3e 3c 2f 4c | 49 3e 0d 0a 0d 0a 3c 4c |</em></L|I>....<L|
|00005c80| 49 3e 0d 0a 3c 65 6d 3e | 6d 6f 75 73 65 45 78 69 |I>..<em>|mouseExi|
|00005c90| 74 65 64 3c 2f 65 6d 3e | 3c 2f 4c 49 3e 0d 0a 0d |ted</em>|</LI>...|
|00005ca0| 0a 3c 4c 49 3e 0d 0a 3c | 65 6d 3e 6d 6f 75 73 65 |.<LI>..<|em>mouse|
|00005cb0| 50 72 65 73 73 65 64 3c | 2f 65 6d 3e 3c 2f 4c 49 |Pressed<|/em></LI|
|00005cc0| 3e 0d 0a 0d 0a 3c 4c 49 | 3e 0d 0a 3c 65 6d 3e 6d |>....<LI|>..<em>m|
|00005cd0| 6f 75 73 65 52 65 6c 65 | 61 73 65 64 3c 2f 65 6d |ouseRele|ased</em|
|00005ce0| 3e 3c 2f 4c 49 3e 0d 0a | 3c 2f 55 4c 3e 0d 0a 0d |></LI>..|</UL>...|
|00005cf0| 0a 3c 4c 49 3e 0d 0a 3c | 41 20 48 52 45 46 3d 22 |.<LI>..<|A HREF="|
|00005d00| 2e 2e 2f 2e 2e 2f 6a 61 | 76 61 2f 61 70 69 2f 6a |../../ja|va/api/j|
|00005d10| 61 76 61 2e 61 77 74 2e | 65 76 65 6e 74 2e 4d 6f |ava.awt.|event.Mo|
|00005d20| 75 73 65 4d 6f 74 69 6f | 6e 4c 69 73 74 65 6e 65 |useMotio|nListene|
|00005d30| 72 2e 68 74 6d 6c 22 3e | 4d 6f 75 73 65 20 6d 6f |r.html">|Mouse mo|
|00005d40| 74 69 6f 6e 0d 0a 65 76 | 65 6e 74 73 3c 2f 41 3e |tion..ev|ents</A>|
|00005d50| 3c 2f 4c 49 3e 0d 0a 0d | 0a 3c 55 4c 3e 0d 0a 3c |</LI>...|.<UL>..<|
|00005d60| 4c 49 3e 0d 0a 3c 65 6d | 3e 6d 6f 75 73 65 44 72 |LI>..<em|>mouseDr|
|00005d70| 61 67 67 65 64 3c 2f 65 | 6d 3e 3c 2f 4c 49 3e 0d |agged</e|m></LI>.|
|00005d80| 0a 0d 0a 3c 4c 49 3e 0d | 0a 3c 65 6d 3e 6d 6f 75 |...<LI>.|.<em>mou|
|00005d90| 73 65 4d 6f 76 65 64 3c | 2f 65 6d 3e 3c 2f 4c 49 |seMoved<|/em></LI|
|00005da0| 3e 0d 0a 3c 2f 55 4c 3e | 0d 0a 0d 0a 3c 4c 49 3e |>..</UL>|....<LI>|
|00005db0| 0d 0a 3c 41 20 48 52 45 | 46 3d 22 2e 2e 2f 2e 2e |..<A HRE|F="../..|
|00005dc0| 2f 6a 61 76 61 2f 61 70 | 69 2f 6a 61 76 61 2e 61 |/java/ap|i/java.a|
|00005dd0| 77 74 2e 65 76 65 6e 74 | 2e 54 65 78 74 4c 69 73 |wt.event|.TextLis|
|00005de0| 74 65 6e 65 72 2e 68 74 | 6d 6c 22 3e 54 65 78 74 |tener.ht|ml">Text|
|00005df0| 20 65 76 65 6e 74 73 3c | 2f 41 3e 3c 2f 4c 49 3e | events<|/A></LI>|
|00005e00| 0d 0a 0d 0a 3c 55 4c 3e | 0d 0a 3c 4c 49 3e 0d 0a |....<UL>|..<LI>..|
|00005e10| 3c 65 6d 3e 74 65 78 74 | 56 61 6c 75 65 43 68 61 |<em>text|ValueCha|
|00005e20| 6e 67 65 64 3c 2f 65 6d | 3e 3c 2f 4c 49 3e 0d 0a |nged</em|></LI>..|
|00005e30| 3c 2f 55 4c 3e 0d 0a 0d | 0a 0d 0a 3c 4c 49 3e 0d |</UL>...|...<LI>.|
|00005e40| 0a 3c 41 20 48 52 45 46 | 3d 22 2e 2e 2f 2e 2e 2f |.<A HREF|="../../|
|00005e50| 6a 61 76 61 2f 61 70 69 | 2f 6a 61 76 61 2e 61 77 |java/api|/java.aw|
|00005e60| 74 2e 65 76 65 6e 74 2e | 57 69 6e 64 6f 77 4c 69 |t.event.|WindowLi|
|00005e70| 73 74 65 6e 65 72 2e 68 | 74 6d 6c 22 3e 57 69 6e |stener.h|tml">Win|
|00005e80| 64 6f 77 20 65 76 65 6e | 74 73 3c 2f 41 3e 3c 2f |dow even|ts</A></|
|00005e90| 4c 49 3e 0d 0a 0d 0a 3c | 55 4c 3e 0d 0a 3c 4c 49 |LI>....<|UL>..<LI|
|00005ea0| 3e 0d 0a 3c 65 6d 3e 77 | 69 6e 64 6f 77 43 6c 6f |>..<em>w|indowClo|
|00005eb0| 73 65 64 3c 2f 65 6d 3e | 3c 2f 4c 49 3e 0d 0a 0d |sed</em>|</LI>...|
|00005ec0| 0a 3c 4c 49 3e 0d 0a 3c | 65 6d 3e 77 69 6e 64 6f |.<LI>..<|em>windo|
|00005ed0| 77 43 6c 6f 73 69 6e 67 | 3c 2f 65 6d 3e 3c 2f 4c |wClosing|</em></L|
|00005ee0| 49 3e 0d 0a 0d 0a 3c 4c | 49 3e 0d 0a 3c 65 6d 3e |I>....<L|I>..<em>|
|00005ef0| 77 69 6e 64 6f 77 44 65 | 69 63 6f 6e 69 66 69 65 |windowDe|iconifie|
|00005f00| 64 3c 2f 65 6d 3e 3c 2f | 4c 49 3e 0d 0a 0d 0a 3c |d</em></|LI>....<|
|00005f10| 4c 49 3e 0d 0a 3c 65 6d | 3e 77 69 6e 64 6f 77 49 |LI>..<em|>windowI|
|00005f20| 63 6f 6e 69 66 69 65 64 | 3c 2f 65 6d 3e 3c 2f 4c |conified|</em></L|
|00005f30| 49 3e 0d 0a 0d 0a 3c 4c | 49 3e 0d 0a 3c 65 6d 3e |I>....<L|I>..<em>|
|00005f40| 77 69 6e 64 6f 77 4f 70 | 65 6e 65 64 3c 2f 65 6d |windowOp|ened</em|
|00005f50| 3e 3c 2f 4c 49 3e 0d 0a | 3c 2f 55 4c 3e 0d 0a 3c |></LI>..|</UL>..<|
|00005f60| 2f 55 4c 3e 0d 0a 0d 0a | 3c 48 52 3e 0d 0a 0d 0a |/UL>....|<HR>....|
|00005f70| 3c 50 3e 3c 21 2d 2d 2a | 2a 2a 2a 2a 2a 2a 2a 2a |<P><!--*|********|
|00005f80| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 49 4e |********|******IN|
|00005f90| 54 52 4f 44 55 43 49 4e | 47 20 4a 42 43 4c 2a 2a |TRODUCIN|G JBCL**|
|00005fa0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005fb0| 2a 2d 2d 3e 0d 0a 3c 41 | 20 4e 41 4d 45 3d 22 4a |*-->..<A| NAME="J|
|00005fc0| 42 43 4c 22 3e 3c 2f 41 | 3e 0d 0a 3c 48 32 3e 49 |BCL"></A|>..<H2>I|
|00005fd0| 6e 74 72 6f 64 75 63 69 | 6e 67 20 74 68 65 20 4a |ntroduci|ng the J|
|00005fe0| 61 76 61 42 65 61 6e 73 | 20 43 6f 6d 70 6f 6e 65 |avaBeans| Compone|
|00005ff0| 6e 74 20 4c 69 62 72 61 | 72 79 3c 2f 48 32 3e 0d |nt Libra|ry</H2>.|
|00006000| 0a 3c 21 2d 2d 42 4e 44 | 58 3d 22 4a 61 76 61 42 |.<!--BND|X="JavaB|
|00006010| 65 61 6e 73 20 43 6f 6d | 70 6f 6e 65 6e 74 20 4c |eans Com|ponent L|
|00006020| 69 62 72 61 72 79 3b 4a | 42 43 4c 2e 20 53 65 65 |ibrary;J|BCL. See|
|00006030| 20 4a 61 76 61 42 65 61 | 6e 73 20 43 6f 6d 70 6f | JavaBea|ns Compo|
|00006040| 6e 65 6e 74 20 4c 69 62 | 72 61 72 79 3b 63 6f 6d |nent Lib|rary;com|
|00006050| 70 6f 6e 65 6e 74 20 6c | 69 62 72 61 72 79 2e 20 |ponent l|ibrary. |
|00006060| 53 65 65 20 4a 61 76 61 | 42 65 61 6e 73 20 43 6f |See Java|Beans Co|
|00006070| 6d 70 6f 6e 65 6e 74 20 | 4c 69 62 72 61 72 79 3b |mponent |Library;|
|00006080| 63 6f 6d 70 6f 6e 65 6e | 74 73 3a 70 72 65 64 65 |componen|ts:prede|
|00006090| 66 69 6e 65 64 20 70 61 | 63 6b 61 67 65 73 3b 70 |fined pa|ckages;p|
|000060a0| 61 63 6b 61 67 65 73 22 | 2d 2d 3e 0d 0a 0d 0a 4a |ackages"|-->....J|
|000060b0| 42 75 69 6c 64 65 72 20 | 63 6f 6d 65 73 20 77 69 |Builder |comes wi|
|000060c0| 74 68 20 61 20 73 65 74 | 20 6f 66 20 70 72 65 64 |th a set| of pred|
|000060d0| 65 66 69 6e 65 64 20 63 | 6f 6d 70 6f 6e 65 6e 74 |efined c|omponent|
|000060e0| 73 20 63 61 6c 6c 65 64 | 20 74 68 65 20 3c 65 6d |s called| the <em|
|000060f0| 3e 4a 61 76 61 42 65 61 | 6e 73 20 43 6f 6d 70 6f |>JavaBea|ns Compo|
|00006100| 6e 65 6e 74 20 4c 69 62 | 72 61 72 79 3c 2f 65 6d |nent Lib|rary</em|
|00006110| 3e 20 28 4a 42 43 4c 29 | 2c 20 77 68 69 63 68 20 |> (JBCL)|, which |
|00006120| 66 6f 6c 6c 6f 77 20 74 | 68 65 20 4a 61 76 61 42 |follow t|he JavaB|
|00006130| 65 61 6e 73 20 6d 6f 64 | 65 6c 2e 20 4a 42 43 4c |eans mod|el. JBCL|
|00006140| 20 63 6f 6e 74 61 69 6e | 73 20 73 69 78 20 70 61 | contain|s six pa|
|00006150| 63 6b 61 67 65 73 3a 0d | 0a 3c 55 4c 3e 0d 0a 3c |ckages:.|.<UL>..<|
|00006160| 4c 49 3e 0d 0a 3c 41 20 | 48 52 45 46 3d 22 23 63 |LI>..<A |HREF="#c|
|00006170| 6f 6e 74 72 6f 6c 70 61 | 63 6b 61 67 65 22 3e 54 |ontrolpa|ckage">T|
|00006180| 68 65 20 3c 65 6d 3e 63 | 6f 6e 74 72 6f 6c 3c 2f |he <em>c|ontrol</|
|00006190| 65 6d 3e 20 70 61 63 6b | 61 67 65 3c 2f 41 3e 3c |em> pack|age</A><|
|000061a0| 2f 4c 49 3e 0d 0a 0d 0a | 3c 4c 49 3e 0d 0a 3c 41 |/LI>....|<LI>..<A|
|000061b0| 20 48 52 45 46 3d 22 23 | 64 61 74 61 73 65 74 70 | HREF="#|datasetp|
|000061c0| 61 63 6b 61 67 65 22 3e | 54 68 65 20 3c 65 6d 3e |ackage">|The <em>|
|000061d0| 64 61 74 61 73 65 74 3c | 2f 65 6d 3e 20 70 61 63 |dataset<|/em> pac|
|000061e0| 6b 61 67 65 3c 2f 41 3e | 3c 2f 4c 49 3e 0d 0a 0d |kage</A>|</LI>...|
|000061f0| 0a 3c 4c 49 3e 0d 0a 3c | 41 20 48 52 45 46 3d 22 |.<LI>..<|A HREF="|
|00006200| 23 6c 61 79 6f 75 74 70 | 61 63 6b 61 67 65 22 3e |#layoutp|ackage">|
|00006210| 54 68 65 20 3c 65 6d 3e | 6c 61 79 6f 75 74 3c 2f |The <em>|layout</|
|00006220| 65 6d 3e 20 70 61 63 6b | 61 67 65 3c 2f 41 3e 3c |em> pack|age</A><|
|00006230| 2f 4c 49 3e 0d 0a 0d 0a | 3c 4c 49 3e 0d 0a 3c 41 |/LI>....|<LI>..<A|
|00006240| 20 48 52 45 46 3d 22 23 | 6d 6f 64 65 6c 70 61 63 | HREF="#|modelpac|
|00006250| 6b 61 67 65 22 3e 54 68 | 65 20 3c 65 6d 3e 6d 6f |kage">Th|e <em>mo|
|00006260| 64 65 6c 3c 2f 65 6d 3e | 20 70 61 63 6b 61 67 65 |del</em>| package|
|00006270| 3c 2f 41 3e 3c 2f 4c 49 | 3e 0d 0a 0d 0a 3c 4c 49 |</A></LI|>....<LI|
|00006280| 3e 0d 0a 3c 41 20 48 52 | 45 46 3d 22 23 75 74 69 |>..<A HR|EF="#uti|
|00006290| 6c 70 61 63 6b 61 67 65 | 22 3e 54 68 65 20 3c 65 |lpackage|">The <e|
|000062a0| 6d 3e 75 74 69 6c 3c 2f | 65 6d 3e 20 70 61 63 6b |m>util</|em> pack|
|000062b0| 61 67 65 3c 2f 41 3e 3c | 2f 4c 49 3e 0d 0a 0d 0a |age</A><|/LI>....|
|000062c0| 3c 4c 49 3e 0d 0a 3c 41 | 20 48 52 45 46 3d 22 23 |<LI>..<A| HREF="#|
|000062d0| 76 69 65 77 70 61 63 6b | 61 67 65 22 3e 54 68 65 |viewpack|age">The|
|000062e0| 20 3c 65 6d 3e 76 69 65 | 77 3c 2f 65 6d 3e 20 70 | <em>vie|w</em> p|
|000062f0| 61 63 6b 61 67 65 3c 2f | 41 3e 3c 2f 4c 49 3e 0d |ackage</|A></LI>.|
|00006300| 0a 3c 2f 55 4c 3e 0d 0a | 0d 0a 3c 41 20 4e 41 4d |.</UL>..|..<A NAM|
|00006310| 45 3d 22 63 6f 6e 74 72 | 6f 6c 70 61 63 6b 61 67 |E="contr|olpackag|
|00006320| 65 22 3e 3c 2f 41 3e 0d | 0a 3c 48 33 3e 54 68 65 |e"></A>.|.<H3>The|
|00006330| 20 63 6f 6e 74 72 6f 6c | 20 70 61 63 6b 61 67 65 | control| package|
|00006340| 3c 2f 48 33 3e 0d 0a 3c | 21 2d 2d 42 4e 44 58 3d |</H3>..<|!--BNDX=|
|00006350| 22 70 61 63 6b 61 67 65 | 73 3a 63 6f 6e 74 72 6f |"package|s:contro|
|00006360| 6c 3b 63 6f 6e 74 72 6f | 6c 20 70 61 63 6b 61 67 |l;contro|l packag|
|00006370| 65 3b 4a 61 76 61 42 65 | 61 6e 73 20 43 6f 6d 70 |e;JavaBe|ans Comp|
|00006380| 6f 6e 65 6e 74 20 4c 69 | 62 72 61 72 79 3a 63 6f |onent Li|brary:co|
|00006390| 6e 74 72 6f 6c 20 70 61 | 63 6b 61 67 65 3b 55 49 |ntrol pa|ckage;UI|
|000063a0| 20 63 6f 6d 70 6f 6e 65 | 6e 74 73 3b 63 6f 6e 74 | compone|nts;cont|
|000063b0| 72 6f 6c 73 22 2d 2d 3e | 0d 0a 0d 0a 54 68 65 20 |rols"-->|....The |
|000063c0| 3c 65 6d 3e 63 6f 6e 74 | 72 6f 6c 20 3c 2f 65 6d |<em>cont|rol </em|
|000063d0| 3e 70 61 63 6b 61 67 65 | 20 63 6f 6e 74 61 69 6e |>package| contain|
|000063e0| 73 20 63 6f 6d 70 6c 65 | 74 65 20 3c 41 20 48 52 |s comple|te <A HR|
|000063f0| 45 46 3d 22 23 76 69 73 | 75 61 6c 61 6e 64 6e 6f |EF="#vis|ualandno|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.