I am making a board game and need two panels on a JFrame. I added them and they look good enough but one of them, the big grid to play the game, doesn't show all the way, I only see a little, I have to resize the window manually.
I have tried with different layouts and nothing works. This is the code in which I add the components to the frame:
panel.setSize(500, 100);
panel.setBackground(Color.WHITE);
panel.add(botonArriba);
panel.add(botonAbajo);
panel.add(botonIzquierda);
panel.add(botonDerecha);
panel.setVisible(true);
this.setDefaultCloseOperation(EXIT_ON_CLOSE);
this.setLocationRelativeTo(null);
tablero.setSize(281, 300);
this.add(tablero, BorderLayout.CENTER);
this.add(panel, BorderLayout.SOUTH);
this.setTitle("2048");
this.pack();
this.setVisible(true);