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 ) {

outputThread = new Thread( this );
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:
access denied < connect, resolve>

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.