I want to put JSeparator between to sections of toolbar. The separator is visible when I add this:
toolbar.add(radioButtonDDA, BorderLayout.NORTH);
toolbar.add(radioButtonPolygon, BorderLayout.NORTH);
toolbar.add(new JSeparator(1));
toolbar.add(radioButtonseedFill, BorderLayout.NORTH);
toolbar.add(radioButtonScanLine, BorderLayout.NORTH);
toolbar.add(patternCheckBox, BorderLayout.NORTH);
toolbar.add(buttonClear, BorderLayout.NORTH);
However It also creates a blank space behind the separator. How to get rid of the space?

