// However, we only want the pure IP address, so we use substring()\r
// to\r
// extract the numbers.\r
- IPAdresse.setText(this.getCodeBase().toString().substring(7,\r
- this.getCodeBase().toString().length() - 1));\r
+ String codeBase = this.getCodeBase().toString();\r
+ if (codeBase.startsWith("http://")) {\r
+ codeBase = codeBase.substring(7, codeBase.length() -1);\r
+ } else if (codeBase.startsWith("file:/")) {\r
+ codeBase = "morefx.dyndns.org";\r
+ }\r
+ IPAdresse.setText(codeBase);\r
// IPAdresse.setText("192.168.123.200"); \r
append(statusFeld,"Current IP = " + IPAdresse.getText()); // display ip address\r
} catch (NullPointerException NPEx) {\r