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.
Please, suppress creating of SystemMenu in NbTitlePane by overriding of assembleSystemMenu() or appropriate method. It is created by default in BasicInternalFrameTitlePane. Marking P1 because it blocks some QA tests. Not serious for regular users.
I'm thinking it would have been better if I hadn't gone back to subclassing BasicInternalFrameTitlePane at your request :-) Painting and layout code in BasicInternalFrameTitlePane both expect the menu to be non-null. Attaching a binary patch which creates a dummy menu and never adds it to anything (it will only be used by the layout), and overrides all uses of it (except rewriting the layout manager the title pane uses). Let me know if it solves the problem.
Created attachment 8750 [details] Binary core patch
As it does no harm (and also addresses another issue), I've checked in the fix for this. The menu is no longer added to anything, so your problem should be solved. Reopen or file another issue if you have further problems with this component.
Thank you for the quick response. It works well.