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.
When you implement an own TabbedComponentFactory and uses JTabbedPaneAdapter the same problem arises as it is described in bug #199311 ("when I try to use the mouse to drag the scrollbar of any TC - editor, explorer-type, Bugzilla, profiler snapshot - which is docked normally (editor mode or not), the scrollbar moves briefly but then stops; the cursor changes to the "drag" icon (arrow plus box); and a red drag outline appears around the window, all as if I had initiated a drag on the title bar"). I have traced it to JTabbedPaneAdapter.tabbedImpl.getTabsArea (). It returns the bounds rectangle of the entire JTabbedPane, not just the headers part. In my hack, I changed getTabsArea () to the following: public Rectangle getTabsArea() { Rectangle r = getBounds(); r.height = 0; if ( getTabCount() > 0 ) { TabbedPaneUI ui = getUI(); for ( int i = 0; i < getTabCount(); i++ ) { r = r.createUnion(getUI().getTabBounds(JTabbedPaneAdapter.this, i)).getBounds(); } } return r; } Maybe not the best solution, but ... Best regards, //Zeljko
core-main b9ede790ed48 thanks for the patch!
Integrated into 'main-golden', will be available in build *201302222300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/b9ede790ed48 User: S. Aubrecht <saubrecht@netbeans.org> Log: #226397 - calculate tabs area properly