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,925
  • 6
  • 38
  • 51
Ankit
  • 609
  • 2
  • 10
  • 26

1 Answers1

3

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

Reimeus
  • 158,255
  • 15
  • 216
  • 276