I am learning Swing, and finding the behaviour of the JSeparator a bit surprising.
I am trying to put two buttons inside a panel using Swing widgets, inside the NetBeans IDE, my JSeparator "border" property is set to "(No border)" in the properties pane.
Nevertheless a line appears. This is not what I would expect from a separator object. Am I doing something wrong? Coming from a background in Delphi, and C# WinForms, I expect to find some oddities in Swing. But how exactly do you make a transparent gap of a particular size, between two buttons in a panel? Do I have to play with layouts and avoid the JSeparator?
Update: it should be trivial to do this with a layout and without any separator object. So how do you do that? I am looking into the Netbeans layout customizer and properties inspector and finding no way to do it. [the word I am looking for is... Insets. aha.]
Answer: Use Insets, not JSeparator. If you MUST insert something from the palette, use an empty panel. In netbeans, use Customize Layout, and adjust Inset.