views:

160

answers:

0

When I create a JPanel in Netbeans, it allows me to specify which LayoutManager to use for it from a fixed set of LayoutManagers, including BoxLayout. After adding a couple of components to the JPanel, I would like to add horizontal spacers (created using Box.createHorizontalStrut) to make the layout look better. I could manually add the spacers by using NetBeans' "Customize Code" option, but this makes maintaining the code a real chore. Is there any way to add horizontal spacers to a BoxLayout using the GUI Builder itself?