// SimpleChatApplet.java -- simple chat client applet // // author : Sandra Loosemore // date : 30 Oct 1995 // import java.awt.*; import java.applet.*; import java.io.*; import java.net.*; public class SimpleChatApplet extends ClientApplet { SimpleChatTextFrame frame; public void init () { frame = new SimpleChatTextFrame (this, "Chat Window"); super.init (); } // override server input handler inherited from ClientApplet public void notifyInput (String s) { frame.print (s); } } class SimpleChatTextFrame extends TextFrame { SimpleChatApplet parent; SimpleChatTextFrame (SimpleChatApplet p, String title) { super (title); parent = p; } public void notifyInput (String s) { parent.conn.print (s); } }