Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.jnk.pongTEST;
- import java.awt.*;
- import javax.swing.JFrame;
- public class Pong extends Canvas{
- private static final String TITLE = "Pong v1.0";
- public static final int WIN_DIM_X = 800;
- public static final int WIN_DIM_Y = 600;
- public static final Dimension SIZE = new Dimension(WIN_DIM_X, WIN_DIM_Y);
- private static final long serialVersionUID = 1L;
- public static void main(String[] args) {
- initialize();
- }
- public static void initialize() {
- JFrame frame = new JFrame();
- //Instantiates Elements Class and triggers it's paint method.
- Elements e = new Elements();
- frame.setTitle(TITLE);
- frame.setPreferredSize(SIZE);
- frame.setResizable(false);
- frame.add(e);
- frame.addMouseMotionListener(new Input());
- frame.pack();
- frame.setLocationRelativeTo(null);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- frame.setVisible(true);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement