Skip to content

Instantly share code, notes, and snippets.

@avh4
Created February 9, 2012 18:10
Show Gist options
  • Save avh4/1781693 to your computer and use it in GitHub Desktop.
Save avh4/1781693 to your computer and use it in GitHub Desktop.
Creating a JFrame
JFrame window = new JFrame("My Game");
MyGame game = new MyGame();
window.add(game);
window.pack();
window.setLocation(100, 100);
window.setVisible(true);
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment