View difference between Paste ID: 33Dt8NPj and rvqLz2Wq
SHOW: | | - or go back to the newest paste.
1
import javax.swing.*;
2
import java.awt.*;
3
4
public class Board {
5-
	JButton button[];
5+
6
    JPanel x1;
7
    JButton[] button = new JButton[65];
8-
    JPanel x1; JPanel x2; JPanel x3; JPanel x4; JPanel x5;JPanel x6; JPanel x7; JPanel x8;
8+
9
    	board = new JPanel();
10
    	BorderLayout bl = new BorderLayout();
11
    	board.setLayout(bl);
12
13
14-
        for (int i=0; i<=5; i++) {
14+
15-
            button[i] = new JButton(""+i);
15+
16
        x1.setLayout(gl);
17
18
19
        for (int i=1; i<button.length; i++) {
20
            button[i] = new JButton("...");
21
            button[i].setPreferredSize(new Dimension(60, 60));
22-
        for (int i=1; i<65; i++) {
22+
23
        }
24
25
        board.add("Center", x1);
26
27
        JFrame frame = new JFrame("Chess");
28
        frame.setContentPane(board);
29
        frame.pack();
30
        frame.setVisible(true);
31
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
32
		  
33
    }
34
    public static void main(String[] args) {
35
    	Board b = new Board();
36
    }
37
}