Class SwingCopy

java.lang.Object
  |
  +--SwingCopy

public class SwingCopy
extends java.lang.Object

Kopiert eine Datei, siehe Methode Copy.copy(). Dient als Demo zur Meldung einer von unten kommenden Ausnahme in der Swing-Benutzeroberflaeche. Siehe als erstes Beispiel Copy.java. Jede in einem ActionListener der Oberfläche auftretende Ausnahme wird mittels Aufruf von multex.Msg.report(frame, exception); in einem PopUp-Fenster inklusive ihrer verursachenden Ausnahmen gemeldet. Das Meldungsfenster enthaelt einen Button "Print Stack Trace", der bei Betätigung den zur Programmfehlersuche interessanten Call-Traceback ausgibt. Nach seiner Betätigung enthält das Meldungsfenster z.B. folgende Ausgabe:

The file "eingabe" could not be copied to "ausgabe"
CAUSE: java.io.FileNotFoundException: eingabe (Das System kann die angegebene Datei nicht finden)

----------Stack Trace follows----------
java.io.FileNotFoundException: eingabe (Das System kann die angegebene Datei nicht finden)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:68)
at Copy.copy(Copy.java:69)
WAS CAUSING:
Copy$CopyFailure: {0}=eingabe  {1}=ausgabe
at Copy.copy(Copy.java:82)
at SwingCopy$1.actionPerformed(SwingCopy.java:72)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1066)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1101)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:378)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:204)
at java.awt.Component.processMouseEvent(Component.java:3160)
at java.awt.Component.processEvent(Component.java:2999)
at java.awt.Container.processEvent(Container.java:990)
at java.awt.Component.dispatchEventImpl(Component.java:2394)
at java.awt.Container.dispatchEventImpl(Container.java:1035)
at java.awt.Component.dispatchEvent(Component.java:2307)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2043)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:1827)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:1730)
at java.awt.Container.dispatchEventImpl(Container.java:1022)
at java.awt.Window.dispatchEventImpl(Window.java:749)
at java.awt.Component.dispatchEvent(Component.java:2307)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:287)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:92)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:83)


Method Summary
static void main(java.lang.String[] i_args)
          Effekt: Erstellt eine Swing-Oberflaeche 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 Swing-Oberflaeche zum Dateikopieren