33 lines
745 B
Java
33 lines
745 B
Java
package de.itsblue.ConnectFour;
|
|
|
|
import java.awt.Dimension;
|
|
import java.awt.GridBagLayout;
|
|
import javax.swing.JFrame;
|
|
|
|
public class ConnectFour extends JFrame {
|
|
/**
|
|
*
|
|
*/
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
ConnectFour() {
|
|
// Constructor
|
|
|
|
// initialize window
|
|
this.setDefaultCloseOperation(EXIT_ON_CLOSE);
|
|
this.setPreferredSize(new Dimension(600,600));
|
|
|
|
this.setLayout(new GridBagLayout());
|
|
this.add(new Plate(Plate.PlateType.X));
|
|
|
|
this.add(new Plate(Plate.PlateType.O));
|
|
|
|
// finish up
|
|
this.pack();
|
|
this.setVisible(true);
|
|
}
|
|
|
|
public static void main(final String[] args) {
|
|
System.out.println(new ConnectFour());
|
|
}
|
|
} |