Exception in thread "main" java.lang.NullPoin
Rogue Hosaka
Messages postés
14
Statut
Membre
-
flav1313 Messages postés 812 Statut Membre -
flav1313 Messages postés 812 Statut Membre -
Bonjour,
public class Tetris extends JFrame {
JLabel Container;
public Tetris() {
Container pane = getContentPane();
pane.setLayout(new BorderLayout());
pane.add(getHeader(), BorderLayout.NORTH);
pane.add(getTextArea(), BorderLayout.CENTER);
Container.setPreferredSize(new Dimension(125, 100));
Board board = new Board(this);
board.setBackground(Color.white);
add(board);
board.start();
setSize(400, 600);
setTitle("Tetris");
setDefaultCloseOperation(EXIT_ON_CLOSE);
}
public JLabel getContainer() {
return Container;
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Tetris game = new Tetris();
game.setLocationRelativeTo(null);
game.setVisible(true);
}
private Component getHeader() {
JLabel label = new JLabel("Score : " + "0", JLabel.CENTER);
label.setFont(new Font("Comic sans ms", Font.BOLD, 20));
return label;
}
private Component getTextArea() {
return new JTextArea(50, 50);
}
}
A voir également:
- Exception in thread "main" java.lang.NullPoin
- In da place - Forum Mail
- Girl in the basement streaming vf - Forum Cinéma / Télé
- Dc in - Forum Disque dur / SSD
- La main de la titi popo ✓ - Forum Musique / Radio / Clip
- Navigation in private - Guide