/* * XError.java -- * * Copyright 1995 Regents of the University of California * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without * fee is hereby granted, provided that this copyright * notice appears in all copies. The University of California * makes no representations about the suitability of this * software for any purpose. It is provided "as is" without * express or implied warranty. * * rcsid = "$Header: /disks/barad-dur/now/rywang/src/java/classes/ryw/XVector.java,v 1.1 1995/11/09 12:19:39 rywang Exp $ xFS (Berkeley)" */ package ryw; import java.lang.*; import java.applet.*; /** * Printing. */ public class XError { static Applet applet = null; public static void initialize (Applet app) { applet = app; } public static void yell (Exception e, String message) { System.err.println (message); if (applet != null) applet.showStatus (message); if (e != null) e.printStackTrace (); } public static void yell (String message) { if (applet != null) applet.showStatus (message); System.err.println (message); } public static void say (String message) { System.out.println (message); if (applet != null) { applet.showStatus (message); } } public static void info (String message) { System.out.println (message); if (applet != null) { applet.showStatus (message); } } }