final UIPanel chatPanel = new UIPanel(new BorderLayout());
final UIPanel bottomPanel = new UIPanel(new BorderLayout());
bottomPanel.setLayoutData(BorderLayoutData.SOUTH);
final UILabel dirLabel = new UILabel("Sample chat. Try using markup like [b]text[/b]:");
dirLabel.setLayoutData(BorderLayoutData.NORTH);
final UITextArea historyArea = new UITextArea();
historyArea.setStyledText(true);
historyArea.setAlignment(Alignment.BOTTOM_LEFT);
historyArea.setEditable(false);
final UIScrollPanel scrollArea = new UIScrollPanel(historyArea);
scrollArea.setLayoutData(BorderLayoutData.CENTER);
final UITextField chatField = new UITextField();
chatField.setLayoutData(BorderLayoutData.CENTER);
final UIButton chatButton = new UIButton("SAY");