Hi,

I have just finished an assignment at uni and im bored during the hols so i decided to make my assignment even better. The assignment was to create a chat client that enables the user to interact with the server and other users of the chat client. Its all working fine.

I am now trying to incorporate image icons like smiley faces etc...
I have a drop down menu with all the desired icons. When an icon is selected it goes into my JTextField along with whatever the user has typed. When the user hits enter the icon needs to be displayed and placed on the screen as well as been passed to the server and other users. My problem is that im not sure on how to get the icon (which is passed into the text as (s), as a smiley for example) out of the text so that i can distinguish which icon it is (if there is one) and display it on screen.

Can anyone help?

Thank you for your time