conversationArea.setText("");
}
});
//if the press enter, send the message
Action sendMessageAction =
new AbstractAction() {
public void actionPerformed(ActionEvent e) {
sendHandler(null);
}
};
Action shiftEnterAction =
new AbstractAction() {
public void actionPerformed(ActionEvent e) {
int pos = textEntryArea.getCaretPosition();
if (pos < 0) {
pos = 0;
}
textEntryArea.insert("\n", pos);
try {
textEntryArea.setCaretPosition(pos + 1);
} catch (IllegalArgumentException ex) {
}
}
};
Action checkCloseAction =
new AbstractAction() {
public void actionPerformed(ActionEvent e) {
checkCloseHandler();
}
};
Action closeAction =
new AbstractAction() {
public void actionPerformed(ActionEvent e) {
closeHandler();
}
};