title: Swing based Java game
body: <p>this is a problem that I've been really struggling with</p>
  
  <p>I need to create a game for some University coursework. The game is basically a 4x4 grid. When i click a button, the player should move randomly within 1 square of it's location. </p>
  
  <p>There's enemy spaceships that are generated randomly over the grid, and if the player lands on the spaceship, it destroys it. if there's two enemy ships on the same sqaure and the player lands on that square, the player is destroyed. </p>
  
  <p>I've created a GIU using <code>gridlayout</code> and the button that I need to move the player, but I'm having problems trying to figure out how to actually use the grid. I've created an <code>element</code> class to create objects for the grid (ie, a list of enemy ships), but I don't know how to use this class with my <code>gridlayout</code>. I know I also have to redraw the grid after each move to reflect the changes, but I don't know if I would need to create a custom redraw method for this.</p>
  
  <p>Any push in the correct direction so I can get my program actually doing something would be really helpful.</p>