Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Graphics;
- import java.awt.Graphics2D;
- import javax.swing.JFrame;
- import javax.swing.JPanel;
- import javax.swing.SwingUtilities;
- import java.awt.EventQueue;
- public class GameManager
- {
- /**
- * Constructor for objects of class GameManager
- */
- public GameManager()
- {
- }
- public static void main( String[] args )
- {
- for (String s: args) {
- System.out.println( s );
- }
- //Note - this calls EventQueue.invokeLater and hence the two are interchangeable
- SwingUtilities.invokeLater( new Runnable()
- {
- @Override
- public void run()
- {
- //Cretae a new skeleton which acts as the base for the rest of our drawings
- Skeleton sk = new Skeleton();
- sk.setVisible( true );
- //Create a new keyManager to listen for key events on Skeleton
- KeyManager keyMan = new KeyManager( sk );
- sk.addKeyListener( keyMan );
- }
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement