private void showHelp(String help[]) { txtCommand.setText(help[0]); bHelp = true; pResult.removeAll(); pResult.add(txtResultScroll, BorderLayout.CENTER); pResult.doLayout(); txtResult.setText(help[1]); pResult.repaint(); txtCommand.requestFocus(); txtCommand.setCaretPosition(help[0].length()); }
// called by the Client to append text in the TextArea void append(String str) { chatArea.append(str); chatArea.setCaretPosition(chatArea.getText().length() - 1); }