You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
683 B
28 lines
683 B
import javax.swing.*;
|
|
import java.awt.*;
|
|
import java.awt.event.KeyEvent;
|
|
import java.awt.event.KeyListener;
|
|
|
|
|
|
public class main {
|
|
public static void main(String[] args) {
|
|
System.out.println("I like birds.");
|
|
JFrame mainframe = new JFrame();
|
|
mainframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
|
mainframe.setResizable(false);
|
|
mainframe.setTitle("Tank Game");
|
|
mainframe.setLocationRelativeTo(null);
|
|
mainframe.setSize(800, 600);
|
|
|
|
//JLabel label = new JLabel("Label test!", JLabel.CENTER);
|
|
//mainframe.add(label);
|
|
|
|
player playerPanel = new player();
|
|
mainframe.add(playerPanel);
|
|
playerPanel.requestFocusInWindow();
|
|
|
|
mainframe.setVisible(true);
|
|
}
|
|
}
|
|
|