Hello,
I am in the process of creating a VERY simple instant messaging program and I need some help. What I want to do is have a way of dynamically adding entires to a jComboBox listing users that have connected with the server. I have already written the server and client sides and I am able to connect. What I am looking to have now is when someone connects to the server their login name (which is entered when they connect) is then passed to every other person that has connected with the server and their name is pushed to a jComboBox that is on a form running on each peron's machine. Each user can then select a name from the comboBox to choose who they would like to chat with. Also, if someone disconnects from the server their login name would be removed from everyone's combo box.
If anyone can provide me with some assistance on how to accomplish this or suggest a better way to do this
it would be greatly appreciated.
Thank you
I am in the process of creating a VERY simple instant messaging program and I need some help. What I want to do is have a way of dynamically adding entires to a jComboBox listing users that have connected with the server. I have already written the server and client sides and I am able to connect. What I am looking to have now is when someone connects to the server their login name (which is entered when they connect) is then passed to every other person that has connected with the server and their name is pushed to a jComboBox that is on a form running on each peron's machine. Each user can then select a name from the comboBox to choose who they would like to chat with. Also, if someone disconnects from the server their login name would be removed from everyone's combo box.
If anyone can provide me with some assistance on how to accomplish this or suggest a better way to do this
it would be greatly appreciated.
Thank you