Class AwtCopy

java.lang.Object
  |
  +--AwtCopy

public class AwtCopy
extends java.lang.Object

Kopiert eine Datei, siehe Methode Copy.copy(). Dient als Demo zur Meldung einer von unten kommenden Ausnahme in der AWT-Benutzeroberfläche. Siehe als erstes Beispiel Copy.java. Jede in einem ActionListener der Oberfläche auftretende Ausnahme wird mittels Aufruf von

    lib.Msg.report(frame, exception);
in einem PopUp-Fenster inklusive ihrer verursachenden Ausnahmen gemeldet. Das Meldungsfenster enthaelt einen Button "Show Stack Trace", der bei Betätigung den zur Programmfehlersuche interessanten Call-Traceback dem Meldungsfenster hinzufügt, z.B.:
----------Stack Trace follows----------
java.io.FileNotFoundException: eingabe
at java.io.FileInputStream.(FileInputStream.java:64)
at Copy.copy(Copy.java:62)
at AwtCopy$1.actionPerformed(AwtCopy.java:65)
at java.awt.Button.processActionEvent(Button.java:254)
at java.awt.Button.processEvent(Button.java:227)
at java.awt.Component.dispatchEventImpl(Component.java:1764)
at java.awt.Component.dispatchEvent(Component.java:1704)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:63)
WAS CAUSING:
Copy$Kopierfehler: [0]=eingabe  [1]=ausgabe
at Copy.CopyFailure(Copy.java:75)
at AwtCopy$1.actionPerformed(AwtCopy.java:65)
at java.awt.Button.processActionEvent(Button.java:254)
at java.awt.Button.processEvent(Button.java:227)
at java.awt.Component.dispatchEventImpl(Component.java:1764)
at java.awt.Component.dispatchEvent(Component.java:1704)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:63)


Method Summary
static void main(java.lang.String[] i_args)
          Effekt: Erstellt eine AWT-Oberfläche zum Dateikopieren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(java.lang.String[] i_args)
Effekt: Erstellt eine AWT-Oberfläche zum Dateikopieren