2

I am using a grid-layout to set a group of around 256 Check-boxes on a JPanel. In the grid-layout documentation i can see that there are 2 methods i.e setHgap() and setVgap(). I am not sure between which components do these methods create gaps; would it be the adjacent checkboxes or the other components within the JPanel.

Razvan
  • 9,650
  • 6
  • 37
  • 50
Ankit
  • 600
  • 2
  • 9
  • 25

1 Answers1

3

setHgap() and setVgap() sets horizontal & vertical gaps respectively between components on the container itself and not along the 'edges'.

Reimeus
  • 155,977
  • 14
  • 207
  • 269