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.

Bug 32311 - GridBag customizer hangs
Summary: GridBag customizer hangs
Status: VERIFIED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: PC All
: P1 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-25 16:58 UTC by Tomas Pavek
Modified: 2004-03-04 22:30 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
sample form - java file (5.24 KB, text/plain)
2003-03-25 16:58 UTC, Tomas Pavek
Details
sample form - form file (6.56 KB, text/plain)
2003-03-25 16:59 UTC, Tomas Pavek
Details
context diff (1.69 KB, text/plain)
2003-04-18 15:11 UTC, Tomas Pavek
Details
binary patch for release35 (25.92 KB, application/octet-stream)
2003-04-18 15:22 UTC, Tomas Pavek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Pavek 2003-03-25 16:58:00 UTC
[release35 build 200303242350, jdk 1.4.x]

GridBagLayout has problems with large JTextFields
having weightx set to 0. When the container is too
small, all component sizes in the container are
screwed. If the GridBag customizer is invoked in
such moment, it hangs with 100% CPU (it tries to
display the components, but they have enormous
width, the computation takes forever). The IDE
must be killed from console...

Workaround is to set right layout constraints
(i.e. weightx to 1).

To reproduce, see attached form. Open it and
shrink the designer - the JTextField dissappears
(the same happens if you execute the form, it's
GridBagLayout behavior). Then invoke the GridBag
customizer.
Comment 1 Tomas Pavek 2003-03-25 16:58:49 UTC
Created attachment 9522 [details]
sample form - java file
Comment 2 Tomas Pavek 2003-03-25 16:59:09 UTC
Created attachment 9523 [details]
sample form - form file
Comment 3 Tomas Pavek 2003-03-25 17:41:12 UTC
Fixed.

/cvs/form/src/org/netbeans/modules/form/layoutsupport/delegates/GridBagCustomizer.java
new revision: 1.12; previous revision: 1.11

Comment 4 Patrick Keegan 2003-04-02 14:39:15 UTC
Tomas, I'm removing the RELNOTE keyword since this bug has 
been fixed. Let me know if there  is info I should include 
in the readme anyway.
Comment 5 Tomas Pavek 2003-04-02 14:54:06 UTC
This has been fixed in trunk only, not in NetBeans 3.5 - so that's why
the RELNOTE keyword. There could me some text like the following in
readme:

GridBag customizer in form editor may occasionally hang if the layout
contains JTextArea with long text that needs to be wrapped and its
Weight X layout property is set to 0. Workaround is to set Weight X to
1 for text components first.
Comment 6 Patrick Keegan 2003-04-02 15:03:27 UTC
OK. I just added it. Thanks.
Comment 7 Jaromir Uhrik 2003-04-17 16:20:12 UTC
Verified in dev build #200304170100. I see no problems or 
side effects.
Comment 8 Jan Chalupa 2003-04-18 11:30:00 UTC
This is a potential showstopper. QA would like the fix to be
backported into release35.
Comment 9 Tomas Pavek 2003-04-18 15:11:43 UTC
Created attachment 10025 [details]
context diff
Comment 10 Tomas Pavek 2003-04-18 15:22:42 UTC
Created attachment 10026 [details]
binary patch for release35
Comment 11 Jan Jancura 2003-04-18 15:26:18 UTC
Looks really good!!!
Comment 12 Jaromir Uhrik 2003-04-18 15:59:44 UTC
QA-check completed - last patch is OK in the last NetBeans 
3.5 Beta build. This is my go! for integration.
Comment 13 _ ttran 2003-04-18 16:19:20 UTC
approved for 3.5
Comment 14 Tomas Pavek 2003-04-22 13:42:57 UTC
Integrated into 3.5.

/cvs/form/src/org/netbeans/modules/form/layoutsupport/delegates/GridBagCustomizer.java
new revision: 1.10.2.2; previous revision: 1.10.2.1
Comment 15 Jaromir Uhrik 2003-04-29 08:28:25 UTC
Verified in RC1(build 200304282350) of NetBeans3.5
Comment 16 Patrick Keegan 2004-03-04 22:30:05 UTC
removing RELNOTE keyword