*/
public void setStatus(Presence.Mode mode, String status) {
for (int i = 0; i < tabPane.getTabCount(); i++) {
TabFramePanel panel = (TabFramePanel) tabPane.getTabAt(i).getContentComponent();
if (panel instanceof ChatRoomPanel) {
ChatRoomPanel window = (ChatRoomPanel) panel;
MultiUserChat chat = window.getChat();
if( chat == null || !chat.isJoined() ) continue;
//set up a packet to be sent to my user in every groupchat
Presence presence = new Presence(Presence.Type.AVAILABLE,
status, 0, mode);
presence.setTo(window.getRoomName() + '/'
+ window.getNickname());
if (!BuddyList.getInstance().checkConnection()) {
BuddyList.getInstance().connectionError();
return;
}