Loading src/view/RoomFrame.java +8 −3 Changes for src/view/RoomFrame.java: 8 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -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(); } Loading @@ -51,7 +55,7 @@ public class RoomFrame extends JFrame { button.addActionListener(e -> { new ChessGameFrame(); }); setPane.add(button); } public void refresh() { Loading @@ -63,6 +67,7 @@ public class RoomFrame extends JFrame { roomList.removeAll(roomList); Searcher.instance.search(); }); setPane.add(button); } } Loading
src/view/RoomFrame.java +8 −3 Changes for src/view/RoomFrame.java: 8 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -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(); } Loading @@ -51,7 +55,7 @@ public class RoomFrame extends JFrame { button.addActionListener(e -> { new ChessGameFrame(); }); setPane.add(button); } public void refresh() { Loading @@ -63,6 +67,7 @@ public class RoomFrame extends JFrame { roomList.removeAll(roomList); Searcher.instance.search(); }); setPane.add(button); } }