put the game object into a jpanel and added the jpanel