I need to create a serverless chat manager can some one help me
What have you done so far?
I have done the GUI but i am having a little problem with the transfer protocol should i use UDP or TCP and how
You're probably better off using TCP since it has built in error checking and makes sure the packets are put together in the same order as they were sent, something which UDP will not do for you.
Take a look at the classes Socket and ServerSocket, should get you off to a good start.