public void actionPerformed(ActionEvent event)
{
try {
connection = new Socket(
InetAddress.getByName(event.getActionCommand()), 5000 );
input = new DataInputStream(
connection.getInputStream() );
output = new DataOutputStream(
connection.getOutputStream() );
}
catch ( IOException e ) {
e.printStackTrace();
}

outputThread = new Thread( this );
outputThread.start();
id.setEditable( false );
}

Hi, above is a part of my client source. Briefly, the client interface will
appear a textfied for user to key in IP, once he/she done, this method will
make a connection to the server by caputuring the client input.

There is no problem if I run both client and server application on a same
pc. If I run it on separate PC, the client is not able to connect to the
server. These are the message thrown:

Exception occurred during event dispathcing: java.security.AccessControlException:
access denied <java.net.SocketPersmission 10.100.1.98:5000 connect, resolve>
at java.security.AccessController.checkPermission<AccessController.java:399>
at......

This is my problem, and I am wondering why it can run on the same PC but
not for separate one. Thanks to clear my doubt.