0

I am trying to build a GUI in netBeans GUI builder. As I align panel next to each other there seems to appear small gaps between the elements as the following picture shows. enter image description here

I've tried searching for the solution for this issue and was suggested to right click on the component and select no space but there is no option for no space

enter image description here

Samit Paudel
  • 181
  • 7
  • 2
    The standard response here would be to NOT use a GUI builder. You are spending time learning the IDE and not learning Java/Swing. The code will not be maintainable if you ever move to another IDE. The easy way to solve your problem is to code the form of your layout by using layout managers to achieve your desired layout. Read the Swing tutorial on [Layout Managers](https://docs.oracle.com/javase/tutorial/uiswing/layout/visual.html) There are plenty of example to get you started. – camickr Dec 21 '20 at 15:18

1 Answers1

0

You need to type 0 in the "Left:" field.

You can also select any "gap" in the editor: it turns green, then with the mouse-wheel you can change its width or height (depending on the gap function).

The Netbeans GUI Builder can be incredibly effective, but to master it you need to understand how it works, best is to follow some tutorials available on internet.

jjazzboss
  • 1,261
  • 8
  • 14
  • Ok, I've solved the problem. Initially it doesnot allow to change it to 0. however, when there was gap more than 14, it allowed me to set it to 0. – Samit Paudel Dec 24 '20 at 18:03