Hi everyone,
From what i see you seem to be doing everything right. Then again as you know that UDP packets are unreliable and sometimes fail to work and there is no garantee in the arrival of the packets. If i were you i would use raw sockets to connect to the server(make sure its multi-threaded for multi-client use) and on both the client and server use streams to transfer the data. Remember that one you disconnect a socket it cannot be reconnected thus you have to create a new socket.
But if you still want to use UDP you can check the below three threads on sending and receiving datagrams respectively and entire java world tip expanation on UDP packets
http://javaalmanac.com/egs/java.net/SendDatagram.html
http://javaalmanac.com/egs/java.net/ReceiveDatagram.html?l=rel
http://www.javaworld.com/javaworld/javatips/jw-javatip40.html
I hoped this helped you
Yours Sincerely
Richard West