31 lines
523 B
Java
31 lines
523 B
Java
package view;
|
|
|
|
import java.awt.Graphics;
|
|
import java.awt.Graphics2D;
|
|
import java.awt.event.ActionEvent;
|
|
import java.awt.event.ActionListener;
|
|
|
|
import javax.swing.JPanel;
|
|
import javax.swing.Timer;
|
|
|
|
public class GameView extends JPanel implements ActionListener{
|
|
|
|
Timer t;
|
|
|
|
public GameView()
|
|
{
|
|
t = new Timer(1000/30, this);
|
|
t.start();
|
|
}
|
|
|
|
public void actionPerformed(ActionEvent arg0) {
|
|
repaint();
|
|
}
|
|
|
|
public void paintComponent(Graphics g)
|
|
{
|
|
super.paintComponent(g);
|
|
Graphics2D g2d = (Graphics2D) g;
|
|
}
|
|
}
|