Decrease space between two JPanel in netbeans prototype

-1

Good afternoon guys.

I'm using netbeans 7.4 to create a simple canvas. It turns out that in this screen (frame0 by default), I added two panes (JPanel). One to be the header and another to be the rest of the screen.

I chose the layout of the panels as EtchedBorder, and I was dragging the two until I adjusted the whole frame.

But the problem is that between the top panel and the bottom panel is a fixed space. I can not slow down.

To try to adjust, I drag the top edge of the bottom panel until it touches the bottom edge of the top panel. But when released, netbeans automatically puts that space.

Does anyone know tell me how to disable, or adjust this space by the same prototypist? Thank you.

    
asked by anonymous 02.06.2014 / 18:33

2 answers

1

This is normal, and varies depending on the layout manager you are using. If you want full control on the bounds of your Swing components, (Netbens) right-click on your JFrame and go to "Define Layout" and select "Null" or any other you know (Absolute for example).

Note: Managers are very complex and have a lot to talk about in just one answer. In short it is not good to use "null" layout due to incompatibility and deformation of the components on different screens or systems, I suggest you study this Swing topic well to build a consistent front.

Att.

    
03.06.2014 / 22:01
0

It has to do with the layout, as Joshua said. To add an appropriate layout: right click on the place where you want to put the JPanels, choose set layout (you want header and body) you can choose the Borderô Layout and put the JPanel for the header in the North part and the other in the Center.

    
04.10.2014 / 03:53