Well, the thing to do would be to mimic what ping is doing... Java supports UDP (java.net.DataGramSocket)... have the applet periodically send out numbered UDP packets then make a program to run on the server to listen for the UDP packets and send messages containing the UDP packet's number back to the applet when it recieves one. The applet will know is any packets are lost ( it will not recieve a response containing the UDP packet number from the server ), and it can use the difference in System.currentTimeMillis() calls to time how long it takes to recieve the reply. (
Please don't ask for code to this... it is only a suggestion...

)
HTH,
-Nate