From cffee3bb08752125a04bd2de2bedc6565657b01b Mon Sep 17 00:00:00 2001 From: Yana Stamcheva Date: Tue, 17 Apr 2007 11:30:45 +0000 Subject: [PATCH] fix chat window refresh --- .../sip/communicator/impl/gui/main/chat/ChatWindow.java | 8 +++----- .../impl/gui/main/chat/ChatWindowManager.java | 6 +++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java index 30310a670..e2bb82b0a 100755 --- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java @@ -195,7 +195,7 @@ private void addChatTab(ChatPanel chatPanel) PresenceStatus status = chatPanel.getChatStatus(); if (getCurrentChatPanel() == null) - { + { this.getContentPane().add(chatPanel, BorderLayout.CENTER); } else @@ -259,10 +259,8 @@ public void removeChat(ChatPanel chatPanel) if(getChatTabCount() == 0) { this.getContentPane().remove(chatPanel); - this.getContentPane().validate(); - this.getContentPane().repaint(); - this.setVisible(false); + this.dispose(); return; } @@ -324,7 +322,7 @@ public void removeAllChats() { this.chatTabbedPane.removeAll(); - this.getContentPane().remove(chatTabbedPane); + this.getContentPane().remove(chatTabbedPane); } else { diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindowManager.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindowManager.java index 5b4fd9844..82eb3586a 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindowManager.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindowManager.java @@ -210,7 +210,7 @@ public void closeWindow() if (answer == JOptionPane.OK_OPTION) { chatWindow.removeAllChats(); - chatWindow.setVisible(false); + chatWindow.dispose(); synchronized (chats) { @@ -231,7 +231,7 @@ else if (System.currentTimeMillis() - chatWindow if (answer == JOptionPane.OK_OPTION) { chatWindow.removeAllChats(); - chatWindow.setVisible(false); + chatWindow.dispose(); synchronized (chats) { @@ -242,7 +242,7 @@ else if (System.currentTimeMillis() - chatWindow else { chatWindow.removeAllChats(); - chatWindow.setVisible(false); + chatWindow.dispose(); synchronized (chats) {