I am finishing a Java application that consists of a program that connects to an IRC room in order to chat with other users... I am using a Jtextpane to process and show the lines sent and received to and from the server... it is really easy to get the private messages in that same jtextpane, but I want it to be a little bit more private, I am using netbeans and I designed a jframe to receive the privates and send responses to an specific user...

The problem is that I don't know how to get the program to process the lines from the same user and send them to the private messages class that corresponds to that user...

Basically I need someway to identify the class that was created so the program sends the line there and not to other one...

Someone said: Use a hashmap, is that what I need?