Hal Vaughan wrote:
Re: Getting A Computers IP Address
Why? What does that do for the end user?*
Had you considered ..
<sscce>
import javax.swing.*;
class GetIPAddress {
public static void main(String[] args) {
JOptionPane.showMessageDialog(
null,
"The appl. needs you IP address so it can AAA\n" +
"To find the IP address on your system, do BBB");
String ipAddress = JOptionPane.showInputDialog(
null,
"IP address");
System.out.println("IP Address: " + ipAddress);
}
}
</sscce>
Where AAA is a text that is sufficiently convincing that
it would *motivate me, as an end user, to supply an IP
address, and BBB is OS specific instructions.
Easy done!
--
Andrew Thompson
http://www.physci.org/
Message posted via
http://www.javakb.com