Space « Border « Java Swing Q&A





1. Removing the spacing around a TitledBorder    stackoverflow.com

A javax.swing.border.TitledBorder introduces a spacing of 2 pixels around the edges of the border. This is quite annoying because it breaks the alignment with the components around. How do you remove this ...

2. Space between Border and a Component    coderanch.com

I had written a panel which consists of three Buttons and I had set a border for it. When I executed I found there is no space between the Border and the Button Component. What method should I add to have some space between the right and left side of the button and the border. private JPanel createSouthWestPanel() { JPanel southWestPanel ...