I'm working on a checkers board in java. But I have a strange problem: Eventough I set the vgap at 0 it still creates a vgap. There is a space of aprox 5px between the squares in height. The width is alright. This is my layout code of the Diagram object:
this.setLayout(new GridLayout(10, 10, 0, 0));
this.setPreferredSize(new Dimension(230, 230));
And this is where I implement the Diagram:
// The jpanel that has to contain the diagram
jpanel.setLayout(new FlowLayout());
add(jpanel, BorderLayout.WEST);
// The placement of the diagram in that jpanel
jp.add(new diagram());
This is how it looks:
[][][][][][][][][]
<The spacing that I have to get removed>
[][][][][][][][][]
But it should be like:
[][][][][][][][][]
[][][][][][][][][]
^
|
no spacing between them