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 161997 - NullPointerException at javax.swing.JComponent.setBorder
Summary: NullPointerException at javax.swing.JComponent.setBorder
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@guibuilder
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-05 21:56 UTC by micrenda
Modified: 2009-07-15 15:25 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 122123


Attachments
stacktrace (5.20 KB, text/plain)
2009-04-05 21:56 UTC, micrenda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description micrenda 2009-04-05 21:56:27 UTC
Build: NetBeans IDE Dev (Build 200902231810)
VM: OpenJDK Client VM, 1.6.0_0-b12, IcedTea6 1.3.1 (6b12-0ubuntu6.4) Runtime Environment, 1.6.0_0-b12
OS: Linux, 2.6.27-11-generic, i386

User Comments:
micrenda: I was editing the formats of a Formatted Text Box.



Stacktrace: 
java.lang.NullPointerException
        at javax.swing.JComponent.setBorder(JComponent.java:1777)
        at org.netbeans.modules.form.editors.FormatSelector$FormatInfoRenderer.getListCellRendererComponent(FormatSelector.java:973)
        at javax.swing.plaf.basic.BasicListUI.paintCell(BasicListUI.java:208)
        at javax.swing.plaf.basic.BasicListUI.paintImpl(BasicListUI.java:317)
        at javax.swing.plaf.basic.BasicListUI.paint(BasicListUI.java:240)
        at javax.swing.plaf.synth.SynthListUI.update(SynthListUI.java:69)
Comment 1 micrenda 2009-04-05 21:56:32 UTC
Created attachment 79488 [details]
stacktrace
Comment 2 Jan Stola 2009-04-06 16:48:59 UTC
The described exception is a problem in JDK, see http://bugs.sun.com/view_bug.do?bug_id=6739738
We will try to implement some workaround to avoid the exception.
Comment 3 Jan Stola 2009-07-15 15:25:24 UTC
I have implemented a workaround. The border is not set if border.getBorderInsets(comp) == null (e.g. in the buggy 
case). I wasn't able to verify the fix on my Windows machine (the issue doesn't occur on Windows). Hence, feel free to 
reopen this issue if the workaround doesn't work for any reason.

Modified file: http://hg.netbeans.org/cdev/rev/d6a695689289