import java.awt.*; public class ChatFrame extends Frame { ClientImplementation client; ChatApplet chatApplet; public ChatFrame(ClientImplementation client) { super(); this.client = client; this.chatApplet = new ChatApplet(); this.chatApplet.setOwner(this); this.chatApplet.init(); this.add(this.chatApplet, "Center"); } public void broadcast(Update event) { try { this.client.getServer().broadcast(event); } catch (Exception e) { } } public String getClientName() { return this.client.name; } }