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 214283 - Null Pointer Exception when drawing Button near to the TextField
Summary: Null Pointer Exception when drawing Button near to the TextField
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.2
Hardware: PC Windows 7 x64
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-15 13:33 UTC by hrza
Modified: 2012-06-22 04:47 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Exception Details (3.22 KB, text/plain)
2012-06-15 13:33 UTC, hrza
Details
Code of JDialog (8.32 KB, text/plain)
2012-06-15 14:07 UTC, hrza
Details
test case - form file (4.55 KB, text/plain)
2012-06-15 16:33 UTC, Tomas Pavek
Details
test case - java file (3.99 KB, text/plain)
2012-06-15 16:33 UTC, Tomas Pavek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hrza 2012-06-15 13:33:18 UTC
Created attachment 120910 [details]
Exception Details

I got Null Pointer exception when i was drawing button near to the text field in a JDialog. The problem occurred when i was resizing button over left border of text field.
Comment 1 hrza 2012-06-15 13:42:59 UTC
P.S. JDialog had free design layout
Comment 2 Tomas Pavek 2012-06-15 13:52:27 UTC
Can you please provide the GUI form where the exception happened, with description on how to reproduce? Thanks. The exception itself is not enough to fix the problem.
Comment 3 hrza 2012-06-15 14:07:08 UTC
Created attachment 120915 [details]
Code of JDialog

Under some package within Module in NBPlatform app add JDialog, and add Pane to it. Add  text field and button on pane (i added few labels at the top also) and button should be very close to the textfield. Resize button, so the "new" dimensions go over text field (button overlays the textfield)... There i got Null Pointer Exception, and every time i try i got stucked. I send you code in attachment Btw, i use JDK 1.7
Comment 4 Tomas Pavek 2012-06-15 15:55:25 UTC
Please attach also the .form file and the Bundle properties file. Thanks. I have no luck trying to reproduce the bug.
Also please state what NetBeans version (or build number if it's a dev build) you use.
Comment 5 Tomas Pavek 2012-06-15 16:33:28 UTC
Created attachment 120922 [details]
test case - form file
Comment 6 Tomas Pavek 2012-06-15 16:33:59 UTC
Created attachment 120923 [details]
test case - java file
Comment 7 Tomas Pavek 2012-06-15 16:37:15 UTC
OK, I've found the test case after all, attached. To reproduce resize the button by its left edge over the textfield.

I guess the reporter has either NB 7.1.x, or an older NB 7.2 build. In 7.1 the exception is thrown. In 7.2 there is no exception, but the button is misplaced (ends up right aligned with the textfield and overlapping it). This deserves a fix.
Comment 8 hrza 2012-06-15 17:14:21 UTC
I use NetBeans IDE 7.2 Beta (Build 201205031832). Well i think i have scored bulls eye, because every new JDialog I create, its not a bug. Only Chat Window i send you is bugging. And i notices, when i move label "Send Message" to some other position its all ok, and when is "glued" to text field (for sending message), then Null Pointer pops out.
Comment 9 Tomas Pavek 2012-06-19 15:46:39 UTC
I've fixed the remaining problem with the misplaced component, as described above. This fix does not go to NB 7.2. The originally reported exception does not happen in NB 7.2, though, it must have been fixed with something else after beta.

http://hg.netbeans.org/jet-main/rev/02e82587303b
Comment 10 Quality Engineering 2012-06-22 04:47:51 UTC
Integrated into 'main-golden', will be available in build *201206220002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/02e82587303b
User: Tomas Pavek <tpavek@netbeans.org>
Log: #214283: fixing incorrect component repositioning after resizing