ok this is a new thread which has the original program codes. Answers would be given reputation points if I get to solve this problem. It had been bugging me over the past week with little or no sleep


. The code might be a bit long so in exchange for your time, any post that is helpful gets reputation points.
client
general pastebin - client - post number 1217688
server
general pastebin - server - post number 1217691
painter
general pastebin - painter - post number 1217671
The codes is real long so here is the explanation.
This is a GUI program. It involves 2 client and a server. Both the clients are supposed to receive the int 99 from the server. The int is sent at line 127 "
outputToClient1.writeInt(99);" and line 161 "
outputToClient2.writeInt(99);" of server.java and it's supposed to be received by the 2 clients at line 358 "
int sadsad = inputFromServer.readInt();".
All I get when the program is executed is garbage numbers on both the clients. Any solution to this? All help is really appreciated. Actually the write and read Int are for testing as I can't get the message to the clients from the server.(Server line 175 & 177, client line 370)
If you want the program, compile every file and start the server first, then start one client and select multiplayer, show to on and start game. then start the other client and select multiplayer, then start the game. It would print out in console.