Up Previous Next

Now we start adding more code.

The first that changes (slightly) is the client:

import java.awt.*; 
import javax.swing.*; 

public class Client extends JFrame { 

  public Client() {
    this.setTitle("iceblox: client frame"); 
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 
    this.setSize(300, 200); 
    this.setVisible(true); 
  }   

  public void registerWith(ServerInterface server) {
    System.out.println("Registering with the server now..."); 
  } 
}
For all we should want to point out at this stage a client is a frame, hence a separate thread.


Up Previous Next