This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
When a component in grid bag layout has zero size (e.g. jLabel with empty text, empty jPanel...), you cannot select this component in the 7.0 grid bag layout customizer. (This empty components are used as a spacer with nonzero weight in many applications)
*** Bug 197732 has been marked as a duplicate of this bug. ***
This problem is caused by the fact that the new customizer (contrary to the old one is more-or-less WYSIWYG). Hence, the zero-sized components have really zero size and as such cannot be selected. On the other hand, the designer was implemented with spacer components in mind. They were even added into the Palette into Swing Fillers category. The components in this category are based on Box.Filler and the new grid-designer recognizes them and pads them artificially to make their size non-zero (hence, allowing their selection). You are right that many users still abuse components like empty JPanel or JLabel without text to implement spacers. We should extend the hacks that we use for Box.Filler currently to cover also these scenarios.
Fixed. The mentioned hack has been extended to other (non Box.Filler) components as well. The width/height of zero-size components is padded to 2. It is hard to select such components directly (i.e., using single click). The best approach is to use Marquee selection (i.e., mouse press, drag and "paint" the selection rectangle, mouse release). The Marquee selection may select also some adjacent (positive-size) components, but it is easy to remove them from multi-selection using Ctrl+click. Modified file: http://hg.netbeans.org/jet-main/rev/81352f62df06
Integrated into 'main-golden', will be available in build *201105130000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/44c10689104a User: Petr Somol <psomol@netbeans.org> Log: #197740 Follow-up; Enlarged Zero Size component to enable direct selection by mouse click in GridBagLayout customizer