0

I am doing a project and need to create a chat client. I have created the friend list and on double click on friend in the list a new chat window should be displayed. The chat window i want to design has a Jtextpane(for the conversation), Jtextarea(user input) and a send button. I have used GUI in netbeans to create the new window.

I make the chatwindow visible on clicking the friend from the friend list but i am not sure how i will instantiate another window which i click on another friend from my friend list.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Pratik_s
  • 38
  • 5
  • create a new instance of your window for every friend, passing the friend as a parameter? – hd1 Jan 21 '13 at 01:05
  • yes. New instance of the chatwindow for every friend. – Pratik_s Jan 21 '13 at 01:10
  • Create a chat window for each friend every time if it is not created. For this chat window, you can pass friend name/ id as parameter. For conference chat, you can have multiple friend names as parateters (some list object). – Yogesh Ralebhat Jan 21 '13 at 04:59
  • 3
    See [The Use of Multiple JFrames, Good/Bad Practice?](http://stackoverflow.com/a/9554657/418556) – Andrew Thompson Jan 21 '13 at 10:17

0 Answers0