https://wiki.roy-bohn.de/index.php?title=CloseWindow&feed=atom&action=history CloseWindow - Versionsgeschichte 2024-03-29T06:51:51Z Versionsgeschichte für diese Seite in Programmers Guide MediaWiki 1.15.2 https://wiki.roy-bohn.de/index.php?title=CloseWindow&diff=268&oldid=prev Roy um 09:18, 22. Jul. 2010 2010-07-22T09:18:21Z <p></p> <table style="background-color: white; color:black;"> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr valign='top'> <td colspan='2' style="background-color: white; color:black;">← Nächstältere Version</td> <td colspan='2' style="background-color: white; color:black;">Version vom 09:18, 22. Jul. 2010</td> </tr> <tr><td colspan="2" class="diff-lineno">Zeile 23:</td> <td colspan="2" class="diff-lineno">Zeile 23:</td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> });</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> });</div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div>&lt;/source&gt;</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>&lt;/source&gt; &nbsp;</div></td></tr> <tr><td colspan="2">&nbsp;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>&#160;</div></td></tr> <tr><td colspan="2">&nbsp;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">[[Category:Java]][[Category:Snippet]]</ins></div></td></tr> <!-- diff generator: internal 2024-03-29 06:51:51 --> </table> Roy https://wiki.roy-bohn.de/index.php?title=CloseWindow&diff=267&oldid=prev Roy:&#32;Die Seite wurde neu angelegt: „== Closing a Window on KeyEvent in Java == <source lang="java"> Toolkit.getDefaultToolkit().getSystemEventQueue().push(new EventQueue() { @Override protected …“ 2010-07-22T09:17:52Z <p>Die Seite wurde neu angelegt: „== Closing a Window on KeyEvent in Java == &lt;source lang=&quot;java&quot;&gt; Toolkit.getDefaultToolkit().getSystemEventQueue().push(new EventQueue() { @Override protected …“</p> <p><b>Neue Seite</b></p><div>== Closing a Window on KeyEvent in Java ==<br /> <br /> &lt;source lang=&quot;java&quot;&gt;<br /> Toolkit.getDefaultToolkit().getSystemEventQueue().push(new EventQueue() {<br /> @Override<br /> protected void dispatchEvent(AWTEvent event) {<br /> if (event instanceof KeyEvent) {<br /> KeyEvent keyEvent = (KeyEvent) event;<br /> if (KeyEvent.KEY_RELEASED == keyEvent.getID() &amp;&amp; <br /> (KeyEvent.VK_ESCAPE == keyEvent.getKeyCode() || <br /> (KeyEvent.VK_F4 == keyEvent.getKeyCode() &amp;&amp; keyEvent.isAltDown() ))) {<br /> <br /> int conf = JOptionPane.showConfirmDialog(f, &quot;Soll die Anwendung wirklich beendet werden?&quot;, &quot;Beenden&quot;, JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, icon);<br /> <br /> if(conf==0){<br /> System.exit(0);<br /> }<br /> <br /> }<br /> }<br /> super.dispatchEvent(event);<br /> }<br /> });<br /> <br /> &lt;/source&gt;</div> Roy