home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 139 / dpcs0999.iso / Web / CFserver / data1.cab / Webroot / classes / CFGraphs / Allaire / Util / debug.class (.txt)
Encoding:
Java Class File  |  1999-04-12  |  1.1 KB  |  32 lines

  1. package allaire.util;
  2.  
  3. import java.awt.Frame;
  4. import java.awt.GridLayout;
  5. import java.awt.TextArea;
  6.  
  7. public class Debug {
  8.    private static TextArea m_textArea;
  9.    private static Frame m_frame;
  10.  
  11.    public static void write(String var0) {
  12.       assureFrameIsShown();
  13.       m_textArea.appendText(var0 + "\n");
  14.    }
  15.  
  16.    private static void assureFrameIsShown() {
  17.       if (m_frame == null) {
  18.          m_frame = new Frame("Debug Output");
  19.          m_frame.setLayout(new GridLayout(1, 1));
  20.          m_textArea = new TextArea(30, 30);
  21.          m_frame.add(m_textArea);
  22.          m_frame.resize(400, 200);
  23.          m_frame.move(500, 200);
  24.       }
  25.  
  26.       if (!m_frame.isShowing()) {
  27.          m_frame.show();
  28.       }
  29.  
  30.    }
  31. }
  32.