removed unused variables and methods, added window title

This commit is contained in:
oliver 2020-02-12 15:30:59 +01:00
parent e8f533bb99
commit 08440f45dd

View file

@ -1,14 +1,9 @@
package de.itsblue.ConnectFour; package de.itsblue.ConnectFour;
import javax.swing.*;
import java.awt.*;
import java.awt.Dimension; import java.awt.Dimension;
import javax.swing.JFrame; import javax.swing.JFrame;
import java.awt.Container;
import java.awt.BorderLayout;
import de.itsblue.ConnectFour.GameBoard; import de.itsblue.ConnectFour.GameBoard;
public class ConnectFour extends JFrame { public class ConnectFour extends JFrame {
@ -18,26 +13,18 @@ public class ConnectFour extends JFrame {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public int r = 6; @Override
public int c = 7; public void setTitle(String name) {
int[][] Gamefield = new int[c][r]; super.setTitle(name);
}
// start
public ConnectFour(final String name) {
super(name);
setResizable(false);
}
ConnectFour() { ConnectFour() {
// Constructor // Constructor
// initialize window // initialize window
this.setDefaultCloseOperation(EXIT_ON_CLOSE); this.setDefaultCloseOperation(EXIT_ON_CLOSE);
this.setTitle("Connect 4");
this.setPreferredSize(new Dimension(600, 600)); this.setPreferredSize(new Dimension(600, 600));