title: Java network game design
body: <p>I am designing a simple chess game in java and want to add network(client and server model) to<br>
  to it. One player is on server side and the other on client side. Right now I hava a server.java client.java and game.java.</p>
  
  <p>game.java is included in both server side and client side(each player has a game instance). My problem is that I don't know when to send data between two sides. I add listener to the game class but the server client seems cannot get the click event inside the game class. One way is that I use busy waiting to continuously check that whether there is an update. But is there a way to check update without using busy waiting?</p>