Advertisement
Guest User

balls

a guest
Oct 5th, 2012
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.70 KB | None | 0 0
  1. import javax.swing.*;
  2. import java.awt.*;
  3. import java.awt.event.*;
  4.  
  5.  
  6. public class TicTacToeFrame extends JFrame
  7. {
  8.     private JButton square11;
  9.  
  10.     public TicTacToeFrame()
  11.     {
  12.         super("Tic-Tac-Toe");
  13.         setLayout(new GridBagLayout());
  14.         GridBagConstraints gbc = new GridBagConstraints();
  15.         gbc.fill = GridBagConstraints.HORIZONTAL;
  16.        
  17.         square11 = new JButton("");
  18.         gbc.fill = GridBagConstraints.HORIZONTAL;
  19.         gbc.gridx = 1;
  20.         gbc.gridy = 0;
  21.         add(square11, gbc);
  22.     }
  23.  
  24.     static public void main(String[] args) {
  25.         final TicTacToeFrame t = new TicTacToeFrame();
  26.         t.pack();
  27.         t.setVisible(true);
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement