
Chapter 5. Building a sample application for the IBM Workplace Managed Client platform 159
Example 5-18 Chat button
private void createChatButton()
{
Button chatButton = new Button(this, SWT.NONE);
chatButton.setText("Chat...");
chatButton.addSelectionListener(new SelectionListener()
{
public void widgetDefaultSelected(SelectionEvent arg0) {}
public void widgetSelected(SelectionEvent arg0)
{
new Chat(LiveNameButton.this, email, "The task", true);
}
});
GridData gd = new GridData();
gd.widthHint = BUTTONS_WIDTH;
chatButton.setLayoutData(gd);
}
Note how the Chat constructor requires a parent control, e-mail address (or
user name), and a subject.
6. The right-most ...