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.
- open java file - select some code - try to click Surround With icon in gutter or Alt-Enter java.lang.NullPointerException at javax.swing.ScrollPaneLayout.preferredLayoutSize(ScrollPaneLayout.java:494) at java.awt.Container.preferredSize(Container.java:1669) at java.awt.Container.getPreferredSize(Container.java:1654) at javax.swing.JComponent.getPreferredSize(JComponent.java:1645) at org.netbeans.modules.editor.hints.borrowed.ScrollCompletionPane.<init>(ScrollCompletionPane.java:104) at org.netbeans.modules.editor.hints.HintsUI.showPopup(HintsUI.java:347) at org.netbeans.modules.editor.hints.HintsUI.invokeDefaultAction(HintsUI.java:484) at org.netbeans.modules.editor.hints.HintsUI.keyPressed(HintsUI.java:512)
I am afraid that this is a know JDK bug (affecting all editor hints, not only the Surround with hint). See issue #116592 for more details. *** This issue has been marked as a duplicate of 116592 ***