Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.*;
- import java.awt.*;
- import java.awt.event.*;
- public class TicTacToeFrame extends JFrame
- {
- private JButton square11;
- public TicTacToeFrame()
- {
- super("Tic-Tac-Toe");
- setLayout(new GridBagLayout());
- GridBagConstraints gbc = new GridBagConstraints();
- gbc.fill = GridBagConstraints.HORIZONTAL;
- square11 = new JButton("");
- gbc.fill = GridBagConstraints.HORIZONTAL;
- gbc.gridx = 1;
- gbc.gridy = 0;
- add(square11, gbc);
- }
- static public void main(String[] args) {
- final TicTacToeFrame t = new TicTacToeFrame();
- t.pack();
- t.setVisible(true);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement