Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package chessgame;
- import javax.swing.*;
- import java.awt.*;
- public class Chess {
- private JFrame f;
- private JPanel p;
- private JButton b1;
- private JLabel lab;
- public Chess(){
- gui();
- }
- public void gui(){
- f = new JFrame("Jogo de Xadrez");
- f.setVisible(true);
- f.setSize(600,600);
- f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- p = new JPanel();
- p.setBackground(Color.GRAY);
- b1 = new JButton("PLayer 1 VS Player 2");
- lab = new JLabel("lol");
- p.add(lab);
- p.add(b1);
- f.add(p);
- }
- public static void main (String [] args){
- new Chess();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement