When using the GridBag layout manager, you can show or hide the grid in Design view.
Because GridBag layout can be difficult to visualize, you can set the Design view to display the grid while you are laying out your interface. As you click and drag components to different areas, you can easily design your application since you know exactly where each component is on the grid. You can then hide the grid when your layout is complete.
The visual editor uses red, dotted lines to indicate the current borders of the grid. Values for the column numbers across the top of the grid (the x value) and row numbers down the left side of the grid (the y value) are displayed as numbers in blue circles. The rows and columns begin their numbering with 0. So, the upper left corner cell is labeled originally as 0,0. As you add components, rows and columns are numbered sequentially based on the previously used number.
To show a grid for the GridBag layout manager: