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 202194 - Showstopper: componentOrientation on JFrame set to <null>, no way to change it, null pointer exception
Summary: Showstopper: componentOrientation on JFrame set to <null>, no way to change ...
Status: RESOLVED INCOMPLETE
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.1
Hardware: Macintosh Mac OS X
: P1 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-15 15:33 UTC by theosib
Modified: 2011-09-16 12:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description theosib 2011-09-15 15:33:00 UTC
Product Version = NetBeans IDE Dev (Build 201109070600)
Operating System = Mac OS X version 10.7.1 running on x86_64
Java; VM; Vendor = 1.6.0_26
Runtime = Java HotSpot(TM) 64-Bit Server VM 20.1-b02-383

I've run into several bugs regarding the componentOrientation property.  But this one is really bad.  I set the componentOrientation on a JFrame to <null>, and now my application crashes every time I run it.  I get a null pointer exception in pack(), and it's because this line of code was added in init_components():

        setComponentOrientation(null);

There is no way to change this setting back.  <default>, which was there before, is no longer an option.  I also cannot "Customize code..." for a JFrame.  I cannot remove the line of code that sets the orientation to null.  The only way to fix this is to set the componentorientation using custom code and set it to ComponentOrientation.UNKNOWN (since there is no ComponentOrientation.DEFAULT).
Comment 1 Jan Stola 2011-09-16 08:59:04 UTC
> There is no way to change this setting back.

Have you tried right-clicking on the corresponding property in Properties window and invoking Restore Default Value? You can also click '...' button next to the property and press Restore to Default there.
Comment 2 theosib 2011-09-16 12:56:00 UTC
> Have you tried right-clicking on the corresponding property in Properties
window and invoking Restore Default Value?

At the time, Restore Default was grayed out.

> You can also click '...' button next to the property and press Restore to Default there.

I don't see that anywhere if the property is set to <null>, but if I change it to custom code, then it appears.

I was able to get it to return to default was to click "..." and set to custom code, then click "..." again and set it to component chooser, and then it went to default.