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.
With today cvs build, I'm unable to start Netbeans due to the following NPE : java.lang.NullPointerException at org.netbeans.swing.tabcontrol.plaf.WindowsSlidingButtonUI.installDefaults(WindowsSlidingButtonUI.java:80) at javax.swing.plaf.basic.BasicButtonUI.installUI(BasicButtonUI.java:63) at javax.swing.JComponent.setUI(JComponent.java:650) at javax.swing.AbstractButton.setUI(AbstractButton.java:1636) at org.netbeans.swing.tabcontrol.SlidingButton.updateUI(SlidingButton.java:91) at javax.swing.AbstractButton.init(AbstractButton.java:2003) at javax.swing.JToggleButton.<init>(JToggleButton.java:145) at org.netbeans.swing.tabcontrol.SlidingButton.<init>(SlidingButton.java:51) at org.netbeans.core.windows.view.ui.slides.SlideBar.syncWithModel(SlideBar.java:351) at org.netbeans.core.windows.view.ui.slides.SlideBar.indicesChanged(SlideBar.java:170) at org.netbeans.swing.tabcontrol.DefaultTabDataModel.fireIndicesChanged(DefaultTabDataModel.java:457) [.............] Looking at the code, it seems that UIManager.get("Button.dashedRectGapX") is null. The following little patch make this works : if (UIManager.get("Button.dashedRectGapX") != null) { dashedRectGapX = ((Integer)UIManager.get("Button.dashedRectGapX")).intValue(); } if (UIManager.get("Button.dashedRectGapY") != null) { dashedRectGapY = ((Integer)UIManager.get("Button.dashedRectGapY")).intValue(); } if (UIManager.get("Button.dashedRectGapWidth") != null) { dashedRectGapWidth = ((Integer)UIManager.get("Button.dashedRectGapWidth")).intValue(); } if (UIManager.get("Button.dashedRectGapHeight") != null) { dashedRectGapHeight = ((Integer)UIManager.get("Button.dashedRectGapHeight")).intValue(); } But as I'm not a swing guru, I don't know if it's a bug in JGoodies L&F or Netbeans. I raise priority to P2 as Netbeans does not start at all: there is no window after the splash and the exception dialog. I'm using JDK1.5b60 and Mandrake 10 -Eric
reassigning
most probably a bug on your side. first of all on mandrake one should not get windows button. thanks for the patch.
I did not realize that WindowsSlidingButtonUI refers to MS Windows. The switching lines I use is : '/opt/netbeans/bin/netbeans' -J-Xms24m -J-Xmx160m -J-Xverify:none --laf com.jgoodies.looks.plastic.NbPlasticXPLookAndFeel -J-Djgoodies.popupDropShadowEnabled=true -J-DClearLook.mode=OFF -J-DPlastic.defaultTheme=ExperienceBlue -J-DPlastic.tabStyle=Metal The NbPlasticXPLookAndFeel is a tweaked PlasticXPLookAndFeel: package com.jgoodies.looks.plastic; import javax.swing.UIDefaults; public class NbPlasticXPLookAndFeel extends PlasticXPLookAndFeel { /** * Initializes the PlasticXP component defaults. * * @param table the UIDefaults table to work with */ protected void initComponentDefaults(UIDefaults table) { super.initComponentDefaults(table); table.put("ScrollBar.width", Integer.valueOf("12")); } } Does it means that it's more likely a bug in jgoodies l&f ?
fixed in trunk, by providing reasonable defauts when using custom L&F. please verify in builds 20040814 and later.
x.
Closed, too old