Example #1
0
  public ChatFrame() {
    super("Chatframe");
    setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

    translator = UI2CeofTranslator.getInstance();
    setLayout(new BorderLayout());
    chatHistory = new FormatTextArea();
    chatHistory.setEditable(false);
    chatHistory.setSize(800, 550);

    inputField = new CommandInputField(chatHistory, connector);
    getContentPane().add(inputField, BorderLayout.SOUTH);
    getContentPane().add(chatHistory, BorderLayout.CENTER);
    setSize(800, 600);
    setVisible(true);
  }
Example #2
0
 @Override
 public void notify(CommandInstance command) {
   chatHistory.setChatText("to me>\t" + command.toString());
 }