SORRY I don't mention you are using an applet.
you can try this:
import java.net.*;
import java.applet.Applet;
import java.awt.Graphics;
public class AppletIp extends Applet{
public void AppletIp() {};
public void paint(Graphics g) {
InetAddress host=null;
try {host=InetAddress.getLocalHost();
} catch (Exception e) {}
String ip=host.getHostAddress();
System.out.print("IP: "+ip);
showStatus(ip);
}
public static void main (String argv[]) throws Exception
{
}
}
it ca