Commit 38c51add authored by 刘家荣's avatar 刘家荣 💬
Browse files

联机记录

parent 5b4d14a9
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -15,19 +15,23 @@ public class RoomFrame extends JFrame {
    private JPanel roomPane;
    
    private JPanel setPane;
    
    private ArrayList<JButton> roomList = new ArrayList<>();
    
    public RoomFrame() {
        this.setTitle("ROOM");
        this.setVisible(true);
        this.setSize(300, 300);
        this.setSize(500, 300);
        this.setLocationRelativeTo(null);
        this.setBackground(Color.white);
        setPane = new JPanel();
        roomPane = new JPanel();
//        setPane = new JPanel();
        
        roomPane.setLayout(new GridLayout(4, 4));
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
        
        createRoom();
        refresh();
        //addRoom();
    }
    
@@ -51,7 +55,7 @@ public class RoomFrame extends JFrame {
        button.addActionListener(e -> {
            new ChessGameFrame();
        });
        
        setPane.add(button);
    }
    
    public void refresh() {
@@ -63,6 +67,7 @@ public class RoomFrame extends JFrame {
            roomList.removeAll(roomList);
            Searcher.instance.search();
        });
        setPane.add(button);
    }
    
}