summaryrefslogtreecommitdiffstats
path: root/Master/Reference Architectures and Patterns/hjp5/html/k100152.html
blob: 8230f64dc26460a8582ff4c2840cd709b96c0351 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
<html>
<head>
<title>
Handbuch der Java-Programmierung, 5. Auflage
</title>
</head>
<body>
<a name="startofbody"></a>
<script language="JavaScript" src="hjp4lib.js">
</script>
<script language="JavaScript">
installKbdHandler("97,#startofbody;101,#endofbody;116,cover.html;122,k100003.html;115,search.html;105,index.html;100,JDKDOCS;112,APIDOCS;104,k100150.html;106,k100151.html;107,k100153.html;108,k100156.html");
</script>
<table border=0 cellpadding=0 cellspacing=1 width="100%">
<tr bgcolor="#EEFFCC">
<td width="7%" align=center bgcolor="#DDCC99"><a href="cover.html">&nbsp;Titel&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="k100003.html">&nbsp;Inhalt&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="search.html">&nbsp;Suchen&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="index.html">&nbsp;Index&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="../jdkdocs/index.html" onClick="this.href=getDocIndex()">&nbsp;DOC&nbsp;</a>
<td align="right">Handbuch der Java-Programmierung, 5. Auflage
<tr bgcolor="#EEFFCC">
<td width="7%" align=center bgcolor="#DDCC99"><a href="k100150.html">&nbsp;&lt;&lt;&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="k100151.html">&nbsp;&nbsp;&lt;&nbsp;&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="k100153.html">&nbsp;&nbsp;&gt;&nbsp;&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="k100156.html">&nbsp;&gt;&gt;&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="../jdkdocs/api/index.html" onClick="this.href=getApiIndex()">&nbsp;API&nbsp;</a>
<td align="right">Kapitel 23 - Grafikausgabe
</table>
<hr>


<!-- Section -->
<a name="sectlevel2id023002"></a>
<h2>23.2 Grundlagen der Grafikausgabe </h2>
<hr>
<ul>
<li><a href="k100152.html#sectlevel2id023002">23.2 Grundlagen der Grafikausgabe</a>
<ul>
<li><a href="k100152.html#sectlevel3id023002001">23.2.1 Anlegen eines Fensters</a>
<li><a href="k100152.html#sectlevel3id023002002">23.2.2 Die Methode paint</a>
<li><a href="k100152.html#sectlevel3id023002003">23.2.3 Das grafische Koordinatensystem</a>
<li><a href="k100152.html#fensterschliessen">23.2.4 Schlie&szlig;en eines Fensters</a>
</ul>
</ul>
<hr>


<!-- Section -->
<a name="sectlevel3id023002001"></a>
<h3>23.2.1 <a name="ixa101523">Anlegen eines Fensters</a></h3>

<p>
Um die Grafikf&auml;higkeiten von Java nutzen zu k&ouml;nnen, muss
das Paket <a name="ixa101524"><a href="index_j.html#ixb100190"><font color=#000080><tt>java.awt</tt></font></a></a>
eingebunden werden. Dies geschieht zweckm&auml;&szlig;igerweise mit
Hilfe folgender Anweisung am Anfang der Klassendefinition: 
<p>
<table border=0 cellspacing=0 cellpadding=0 width=100% bgcolor="#EEFFCC">
<tr>
<td valign=top width=100%>
<font color="#660066">
<pre>
import java.awt.*;
</pre>
</font>
</td>
</tr>
</table>

<p>
Danach stehen alle Klassen aus dem Paket <a href="index_j.html#ixb100190"><font color=#000080><tt>java.awt</tt></font></a>
zur Verf&uuml;gung. 

<p>
Zur Ausgabe von grafischen Elementen ben&ouml;tigt die Anwendung ein
Fenster, auf das die Ausgabeoperationen angewendet werden k&ouml;nnen.
W&auml;hrend bei der Programmierung eines Applets ein Standardfenster
automatisch zur Verf&uuml;gung gestellt wird, muss eine <i>Applikation</i>
ihre Fenster selbst erzeugen. Da die Kommunikation mit einem Fenster
&uuml;ber eine Reihe von Callback-Methoden abgewickelt wird, wird
eine Fensterklasse in der Regel nicht einfach instanziert. Statt dessen
ist es meist erforderlich, eine eigene Klasse aus einer der vorhandenen
abzuleiten und die ben&ouml;tigten Interfaces zu implementieren. 

<p>
Zum Ableiten einer eigenen Fensterklasse wird in der Regel entweder
die Klasse <a name="ixa101525"><a href="index_f.html#ixb101144"><font color=#000080><tt>Frame</tt></font></a></a>
oder die Klasse <a name="ixa101526"><a href="index_d.html#ixb101145"><font color=#000080><tt>Dialog</tt></font></a></a>
verwendet, die beide aus <a name="ixa101527"><a href="index_w.html#ixb101146"><font color=#000080><tt>Window</tt></font></a></a>
abgeleitet sind. Da <a href="index_d.html#ixb101145"><font color=#000080><tt>Dialog</tt></font></a>
vorwiegend daf&uuml;r verwendet wird, Dialogboxen zu erstellen, die
&uuml;ber darin enthaltene Komponenten mit dem Anwender kommunizieren,
wollen wir ihre Verwendung bis zum <a href="k100201.html#kapitelguidialoge">Kapitel 31</a>
zur&uuml;ckstellen. Die wichtigste Klasse zur Ausgabe von Grafiken
in Java-Applikationen ist also <a href="index_f.html#ixb101144"><font color=#000080><tt>Frame</tt></font></a>.

<p>
Um ein einfaches Fenster zu erzeugen und auf dem Bildschirm anzuzeigen,
muss ein neues Element der Klasse <a href="index_f.html#ixb101144"><font color=#000080><tt>Frame</tt></font></a>
erzeugt, auf die gew&uuml;nschte Gr&ouml;&szlig;e gebracht und durch
Aufruf der Methode <a name="ixa101528"><a href="index_s.html#ixb101147"><font color=#000080><tt>setVisible</tt></font></a></a>
sichtbar gemacht werden: 
<a name="einfachfenster"></a>

<p>
<table border=0 cellspacing=0 cellpadding=0 width=100% bgcolor="#DDDDDD">
<tr>
<td valign=top>
<font color="#000055">
<pre>
<font color="#555555">001 </font><font color="#00AA00">/* Listing2301.java */</font>
<font color="#555555">002 </font>
<font color="#555555">003 </font><font color="#0000AA">import</font> java.awt.*;
<font color="#555555">004 </font>
<font color="#555555">005 </font><font color="#0000AA">class</font> Listing2301
<font color="#555555">006 </font>{
<font color="#555555">007 </font>  <font color="#0000AA">public</font> <font color="#0000AA">static</font> <font color="#006699">void</font> main(String[] args)
<font color="#555555">008 </font>  {
<font color="#555555">009 </font>    Frame wnd = <font color="#0000AA">new</font> Frame(<font color="#0000FF">"Einfaches Fenster"</font>);
<font color="#555555">010 </font>
<font color="#555555">011 </font>    wnd.setSize(400,300);
<font color="#555555">012 </font>    wnd.setVisible(<font color="#006699">true</font>);
<font color="#555555">013 </font>  }
<font color="#555555">014 </font>}</pre>
</font>
</td>
<td valign=top align=right>
<a href="../examples/Listing2301.java"><font color="#000055" size=-1>Listing2301.java</font></a></td>
</tr>
</table>
<i>
Listing 23.1: Ein einfaches Fenster erzeugen</i></p>

<p>
Das Ausf&uuml;hren dieses Programms f&uuml;hrt dazu, dass ein Fenster
mit dem Titel &#187;Einfaches Fenster&#171; erzeugt und in der Gr&ouml;&szlig;e
400*300 Pixel auf dem Bildschirm angezeigt wird. 
<p>
<table border=0 cellspacing=0 cellpadding=0 width=100%>
<tr>
<td width=1 align=left valign=top bgcolor="#000077"><img src="trp1_1.gif"></td>
<td><img src="trp1_1.gif" width=2></td>
<td valign=top width=1000>

<p>
Da wir noch keinen Code f&uuml;r die Behandlung von GUI-Events eingebaut
haben, bietet das Fenster lediglich das von Windows her bekannte Standardverhalten.
Es l&auml;&szlig;t sich verschieben und in der Gr&ouml;&szlig;e ver&auml;ndern
und besitzt eine Titel- und Men&uuml;leiste, die mit einem Systemmen&uuml;
ausgestattet ist. Anders als in anderen grafikorientierten Systemen
gibt es noch keine Funktionalit&auml;t zum Beenden des Fensters. Das
Beispielprogramm kann daher nur durch einen harten Abbruch seitens
des Benutzers (z.B. durch Dr&uuml;cken von <font color="#007700"><tt>[STRG]</tt></font>+<font color="#007700"><tt>[C]</tt></font>
in der DOS-Box, aus der das Fenster gestartet wurde) beendet werden.
Wir werden im n&auml;chsten Beispiel Programmcode zum ordnungsgem&auml;&szlig;en
Schlie&szlig;en des Fensters einf&uuml;gen.</td>
<td><img src="trp1_1.gif" width=2></td>
<td valign=top>
<table border=0 cellspacing=0 cellpadding=1 width=100% bgcolor="#000077">
<tr>
<td><font color="#FFFFFF">&nbsp;Hinweis&nbsp;</font></td>
</tr>
</table>
</td>
<td width=1 align=left valign=top bgcolor="#000077"><img src="trp1_1.gif"></td>
</tr>
</table>


<!-- Section -->
<a name="sectlevel3id023002002"></a>
<h3>23.2.2 Die Methode paint </h3>

<p>
Die Ausgabe in ein Fenster erfolgt durch &Uuml;berlagern der Methode
<a name="ixa101529"><a href="index_p.html#ixb101148"><font color=#000080><tt>paint</tt></font></a></a>,
die immer dann aufgerufen wird, wenn das Fenster ganz oder teilweise
neu gezeichnet werden muss. Dies ist beispielsweise dann der Fall,
wenn das Fenster zum ersten Mal angezeigt wird oder durch Benutzeraktionen
ein Teil des Fensters sichtbar wird, der bisher verdeckt war. <a href="index_p.html#ixb101148"><font color=#000080><tt>paint</tt></font></a>
bekommt beim Aufruf eine Instanz der Klasse <a name="ixa101530"><a href="index_g.html#ixb101149"><font color=#000080><tt>Graphics</tt></font></a></a>
&uuml;bergeben: 
<p>
<table border=0 cellspacing=0 cellpadding=0 width=100% bgcolor="#EEFFCC">
<tr>
<td valign=top width=100%>
<font color="#660066">
<pre>
public void paint(Graphics g)
</pre>
</font>
</td>
<td valign=top>
<a href="../jdkdocs/api/java/awt/Component.html" onClick="this.href=getApiDoc('java.awt.Component')"><font color="#660066" size=-1>java.awt.Component</font></a></td>
</tr>
</table>

<p>
<a href="index_g.html#ixb101149"><font color=#000080><tt>Graphics</tt></font></a>
ist Javas Implementierung eines <a name="ixa101531"><i>Device-Kontexts</i></a>
(auch <a name="ixa101532"><i>Grafikkontext</i></a> genannt) und stellt
somit die Abstraktion eines universellen Ausgabeger&auml;ts f&uuml;r
Grafik und Schrift dar. Die Klasse bietet Methoden zur Erzeugung von
Linien-, F&uuml;ll- und Textelementen. Dar&uuml;ber hinaus verwaltet
<a href="index_g.html#ixb101149"><font color=#000080><tt>Graphics</tt></font></a>
die Zeichenfarbe, in der alle Ausgaben erfolgen, und einen Font, der
zur Ausgabe von Schrift verwendet wird. Ein Device-Kontext kann daher
als eine Art universelles Ausgabeger&auml;t angesehen werden, das
elementare Funktionen zur Ausgabe von farbigen Grafik- und Schriftzeichen
zur Verf&uuml;gung stellt. 

<!-- Section -->

<a name="sectlevel3id023002003"></a>
<h3>23.2.3 Das grafische Koordinatensystem </h3>

<p>
Die Ausgabe von Grafik basiert auf einem zweidimensionalen <a name="ixa101533">Koordinatensystem</a>,
dessen Ursprungspunkt (0,0) in der linken oberen Ecke liegt (siehe
<a href="k100152.html#koordinatensystemjava">Abbildung 23.1</a>).
Positive <i>x</i>-Werte erstrecken sich nach rechts, positive <i>y</i>-Werte
nach unten. Die Ma&szlig;einheit entspricht einem Bildschirmpixel
und ist damit ger&auml;teabh&auml;ngig. 

<p>
In den meisten F&auml;llen steht dem Programm nicht das gesamte Fenster
zur Ausgabe zur Verf&uuml;gung, sondern es gibt <i>Randelemente</i>
wie Titelzeilen, Men&uuml;s oder Rahmen, die nicht &uuml;berschrieben
werden k&ouml;nnen. Mit der Methode <a name="ixa101534"><a href="index_g.html#ixb101153"><font color=#000080><tt>getInsets</tt></font></a></a>
kann die Gr&ouml;&szlig;e dieser Randelemente ermittelt werden. Wir
werden darauf in <a href="k100156.html#kapiteltextausgabe">Kapitel 24</a>
noch einmal zur&uuml;ckkommen. 
<p>
<a name="koordinatensystemjava"></a>
<img src="images/KoordSystem.gif">
<p>

<p><i>
Abbildung 23.1: Das Koordinatensystem von Java</i></p>


<!-- Section -->
<a name="fensterschliessen"></a>
<h3>23.2.4 <a name="ixa101535">Schlie&szlig;en eines Fensters</a></h3>

<p>
Ein einfaches Hauptfenster, wie es im vorigen Beispiel gezeigt wurde,
besitzt keinerlei Funktionalit&auml;t, um vom Anwender auf geordnete
Weise geschlossen werden zu k&ouml;nnen. Alle entsprechenden Dialogelemente
im Systemmen&uuml; sind ohne Funktion. Tats&auml;chlich mu&szlig;ten
wir das Programm durch Dr&uuml;cken von <font color="#007700"><tt>[STRG]</tt></font>+<font color="#007700"><tt>[C]</tt></font>
abbrechen. Ohne zu tief in Details einzusteigen (diese werden in <a href="k100180.html#kapiteleventhandling">Kapitel 28</a>
und <a href="k100184.html#kapitellowlevelevents">Kapitel 29</a> nachgereicht)
wollen wir an dieser Stelle beispielhaft einen geeigneten Mechanismus
zum Schlie&szlig;en des Hauptfensters vorstellen. 

<p>
Soll der Anwender ein Hauptfenster schlie&szlig;en k&ouml;nnen, muss
ein <a name="ixa101536"><a href="index_w.html#ixb101155"><font color=#000080><tt>WindowListener</tt></font></a></a>
registriert werden. Dabei handelt es sich um ein Interface, dessen
Methode <a href="index_w.html#ixb101156"><font color=#000080><tt>windowClosing</tt></font></a>
aufgerufen wird, wenn der Anwender &uuml;ber das System-Men&uuml;
oder den Schlie&szlig;en-Button das Fenster schlie&szlig;en will.
Das Programm wird in diesem Fall <font color="#000077"><tt>setVisible(false)</tt></font>
aufrufen, um das Fenster zu schlie&szlig;en, und n&ouml;tigenfalls
<font color="#000077"><tt>System.exit</tt></font> anh&auml;ngen, um
zus&auml;tzlich das Programm zu beenden. 

<p>
Da ein solcher <a href="index_w.html#ixb101155"><font color=#000080><tt>WindowListener</tt></font></a>
in praktisch jedem GUI-Programm ben&ouml;tigt wird, wollen wir eine
Klasse <a name="ixa101537"><a href="index_w.html#ixb100159"><font color=#000080><tt>WindowClosingAdapter</tt></font></a></a>
vorstellen, die in allen folgenden Beispielen wiederverwendet werden
kann: 
<a name="windowclosingadapter"></a>

<p>
<table border=0 cellspacing=0 cellpadding=0 width=100% bgcolor="#DDDDDD">
<tr>
<td valign=top>
<font color="#000055">
<pre>
<font color="#555555">001 </font><font color="#00AA00">/* WindowClosingAdapter.java */</font>
<font color="#555555">002 </font>
<font color="#555555">003 </font><font color="#0000AA">import</font> java.awt.*;
<font color="#555555">004 </font><font color="#0000AA">import</font> java.awt.event.*;
<font color="#555555">005 </font>
<font color="#555555">006 </font><font color="#0000AA">public</font> <font color="#0000AA">class</font> WindowClosingAdapter
<font color="#555555">007 </font><font color="#0000AA">extends</font> WindowAdapter
<font color="#555555">008 </font>{
<font color="#555555">009 </font>  <font color="#0000AA">private</font> <font color="#006699">boolean</font> exitSystem;
<font color="#555555">010 </font>
<font color="#555555">011 </font>  <font color="#00AA00">/**
<font color="#555555">012 </font>   * Erzeugt einen WindowClosingAdapter zum Schliessen
<font color="#555555">013 </font>   * des Fensters. Ist exitSystem true, wird das komplette
<font color="#555555">014 </font>   * Programm beendet.
<font color="#555555">015 </font>   */</font>
<font color="#555555">016 </font>  <font color="#0000AA">public</font> WindowClosingAdapter(<font color="#006699">boolean</font> exitSystem)
<font color="#555555">017 </font>  {
<font color="#555555">018 </font>    <font color="#006699">this</font>.exitSystem = exitSystem;
<font color="#555555">019 </font>  }
<font color="#555555">020 </font>
<font color="#555555">021 </font>  <font color="#00AA00">/**
<font color="#555555">022 </font>   * Erzeugt einen WindowClosingAdapter zum Schliessen
<font color="#555555">023 </font>   * des Fensters. Das Programm wird nicht beendet.
<font color="#555555">024 </font>   */</font>
<font color="#555555">025 </font>  <font color="#0000AA">public</font> WindowClosingAdapter()
<font color="#555555">026 </font>  {
<font color="#555555">027 </font>    <font color="#006699">this</font>(<font color="#006699">false</font>);
<font color="#555555">028 </font>  }
<font color="#555555">029 </font>
<font color="#555555">030 </font>  <font color="#0000AA">public</font> <font color="#006699">void</font> windowClosing(WindowEvent event)
<font color="#555555">031 </font>  {
<font color="#555555">032 </font>    event.getWindow().setVisible(<font color="#006699">false</font>);
<font color="#555555">033 </font>    event.getWindow().dispose();
<font color="#555555">034 </font>    <font color="#0000AA">if</font> (exitSystem) {
<font color="#555555">035 </font>      System.exit(0);
<font color="#555555">036 </font>    }
<font color="#555555">037 </font>  }
<font color="#555555">038 </font>}</pre>
</font>
</td>
<td valign=top align=right>
<a href="../examples/WindowClosingAdapter.java"><font color="#000055" size=-1>WindowClosingAdapter.java</font></a></td>
</tr>
</table>
<i>
Listing 23.2: Die Klasse WindowClosingAdapter</i></p>

<p>
Um den gew&uuml;nschten Effekt zu erzielen, muss der Listener beim
zu schlie&szlig;enden Fenster durch Aufruf von <a name="ixa101538"><a href="index_a.html#ixb101157"><font color=#000080><tt>addWindowListener</tt></font></a></a>
registriert werden. Dadurch wird beim Anklicken des Schlie&szlig;en-Buttons
(bzw. beim Aufrufen des entsprechenden Systemmen&uuml;eintrags) die
Methode <a name="ixa101539"><a href="index_w.html#ixb101156"><font color=#000080><tt>windowClosing</tt></font></a></a>
aufgerufen und das Fenster geschlossen. Falls <a href="index_t.html#ixb100233"><font color=#000080><tt>true</tt></font></a>
an den Konstruktor &uuml;bergeben wurde, beendet der Listener das
gesamte Programm. 

<p>
Damit kann <a href="k100152.html#einfachfenster">Listing 23.1</a>
wie folgt verbessert werden: 
<a name="listingid023003"></a>

<p>
<table border=0 cellspacing=0 cellpadding=0 width=100% bgcolor="#DDDDDD">
<tr>
<td valign=top>
<font color="#000055">
<pre>
<font color="#555555">001 </font><font color="#00AA00">/* Listing2303.java */</font>
<font color="#555555">002 </font>
<font color="#555555">003 </font><font color="#0000AA">import</font> java.awt.*;
<font color="#555555">004 </font>
<font color="#555555">005 </font><font color="#0000AA">class</font> Listing2303
<font color="#555555">006 </font>{
<font color="#555555">007 </font>  <font color="#0000AA">public</font> <font color="#0000AA">static</font> <font color="#006699">void</font> main(String[] args)
<font color="#555555">008 </font>  {
<font color="#555555">009 </font>    Frame wnd = <font color="#0000AA">new</font> Frame(<font color="#0000FF">"Fenster schlie&szlig;en"</font>);
<font color="#555555">010 </font>    wnd.addWindowListener(<font color="#0000AA">new</font> WindowClosingAdapter(<font color="#006699">true</font>));
<font color="#555555">011 </font>    wnd.setSize(400,300);
<font color="#555555">012 </font>    wnd.setVisible(<font color="#006699">true</font>);
<font color="#555555">013 </font>  }
<font color="#555555">014 </font>}</pre>
</font>
</td>
<td valign=top align=right>
<a href="../examples/Listing2303.java"><font color="#000055" size=-1>Listing2303.java</font></a></td>
</tr>
</table>
<i>
Listing 23.3: Das Schlie&szlig;en des Fensters erm&ouml;glichen</i></p>
<p>
<table border=0 cellspacing=0 cellpadding=0 width=100%>
<tr>
<td width=1 align=left valign=top bgcolor="#000077"><img src="trp1_1.gif"></td>
<td><img src="trp1_1.gif" width=2></td>
<td valign=top width=1000>

<p>
Damit sich die Beispiele, in denen der <a href="index_w.html#ixb100159"><font color=#000080><tt>WindowClosingAdapter</tt></font></a>
verwendet wird, kompilieren lassen, muss die Datei <font color="#660099">WindowClosingAdapter.java</font>
im aktuellen Verzeichnis vorhanden sein. Sie befindet sich auf der
DVD zum Buch oder kann direkt aus <a href="k100152.html#windowclosingadapter">Listing 23.2</a>
entnommen werden.</td>
<td><img src="trp1_1.gif" width=2></td>
<td valign=top>
<table border=0 cellspacing=0 cellpadding=1 width=100% bgcolor="#000077">
<tr>
<td><font color="#FFFFFF">&nbsp;Hinweis&nbsp;</font></td>
</tr>
</table>
</td>
<td width=1 align=left valign=top bgcolor="#000077"><img src="trp1_1.gif"></td>
</tr>
</table>
<hr>
<table border=0 cellpadding=0 cellspacing=1 width="100%">
<tr bgcolor="#EEFFCC">
<td width="7%" align=center bgcolor="#DDCC99"><a href="cover.html">&nbsp;Titel&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="k100003.html">&nbsp;Inhalt&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="search.html">&nbsp;Suchen&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="index.html">&nbsp;Index&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="../jdkdocs/index.html" onClick="this.href=getDocIndex()">&nbsp;DOC&nbsp;</a>
<td align="right">Handbuch der Java-Programmierung, 5. Auflage, Addison
Wesley, Version 5.0.1
<tr bgcolor="#EEFFCC">
<td width="7%" align=center bgcolor="#DDCC99"><a href="k100150.html">&nbsp;&lt;&lt;&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="k100151.html">&nbsp;&nbsp;&lt;&nbsp;&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="k100153.html">&nbsp;&nbsp;&gt;&nbsp;&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="k100156.html">&nbsp;&gt;&gt;&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="../jdkdocs/api/index.html" onClick="this.href=getApiIndex()">&nbsp;API&nbsp;</a>
<td align="right">&copy; 1998, 2007 Guido Kr&uuml;ger &amp; Thomas
Stark, <a href="http://www.javabuch.de">http://www.javabuch.de</a>
</table>
<a name="endofbody"></a>
</body>
</html>