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 219709 - Workaround for JDK Bug : New File does not scroll to bottom of categories list
Summary: Workaround for JDK Bug : New File does not scroll to bottom of categories list
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: JDK Problems (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal with 1 vote (vote)
Assignee: Stanislav Aubrecht
URL: http://bugs.sun.com/bugdatabase/view_...
Keywords:
: 200669 202531 214005 218161 222797 225184 225896 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-10-08 14:44 UTC by everflux
Modified: 2013-04-05 14:41 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
New file dialog box (29.29 KB, image/png)
2012-10-08 14:44 UTC, everflux
Details
Problem reproduced in a plain Swing app. (32.86 KB, image/png)
2012-10-31 13:30 UTC, Stanislav Aubrecht
Details

Note You need to log in before you can comment on or make changes to this bug.
Description everflux 2012-10-08 14:44:37 UTC
Created attachment 125596 [details]
New file dialog box

Maven project, right click on "src/main/resources" Folder, "New" -> "Other" openes "Choose File Type" Dialog.
The list on the left starts with "Java" and ends with "WebLogic", the scoll bar is right below the bottom.
When scrolling with the mouse wheel the content flickers and the scroll bar is always jumping back to the previous position.
When using the mouse to draf the scroll bar to the bottom "Other" becomes visible, but when releasing the mouse button, the scroll bar jumps back again to the previous position. 
"Other" can not be selected.
When typing "Oth" it is selected correctly and the scroll bar moves down. Pressing "esc" leads to the previous situation that the scroll bar is right below the bottom and can not be convinced to move down.

I use Ubuntu 12.04, Java 7u7.
Comment 1 Stanislav Aubrecht 2012-10-30 16:16:37 UTC
*** Bug 218161 has been marked as a duplicate of this bug. ***
Comment 2 Stanislav Aubrecht 2012-10-31 12:51:49 UTC
*** Bug 214005 has been marked as a duplicate of this bug. ***
Comment 3 Stanislav Aubrecht 2012-10-31 13:30:55 UTC
Created attachment 126857 [details]
Problem reproduced in a plain Swing app.

This is a bug either in BasicTreeUI or in ScrollPaneLayout (or both).

When JTree.setLargeModel(true) is being used then horizontal scroll bar appears as needed when scrolling the tree vertically. If currently visible tree rows are short enough then horizontal scrollbar disappears. If at least one visible row is too wide horizontal scroll bar pops in.

However this mechanism is broken if the last tree row is too long to fit visible area and all other rows are short enough to show without scrollbar. See the third JTree screenshot in the attachment - only the very last tree row is too long.
Now if the tree is resized vertical scrollbar will show - as in picture A. Pressing End key to move selection to the last tree row will scroll the tree down. But since the last row is too long the horizontal scrollbar will show. However it will take some of the vertical space - see picture B. At this point clicking 'down' button on the vertical scrollbar does nothing. Also the horizontal scrollbar stays at same position when being manipulated by mouse.
Comment 4 Marian Mirilovic 2012-11-27 22:00:51 UTC
*** Bug 222797 has been marked as a duplicate of this bug. ***
Comment 5 Marian Mirilovic 2012-12-04 10:33:09 UTC
*** Bug 200669 has been marked as a duplicate of this bug. ***
Comment 6 Stanislav Aubrecht 2013-02-08 15:29:58 UTC
*** Bug 225896 has been marked as a duplicate of this bug. ***
Comment 7 Stanislav Aubrecht 2013-02-08 16:22:28 UTC
I've added workaround in core-main c56097e8db9a
Comment 8 Marian Mirilovic 2013-02-08 16:27:26 UTC
(In reply to comment #7)
> I've added workaround in core-main c56097e8db9a

Standa, is it save?   If so, we will add it on the list for 7.3 Patch 1 ?
Comment 9 Stanislav Aubrecht 2013-02-08 16:31:58 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > I've added workaround in core-main c56097e8db9a
> 
> Standa, is it save?   If so, we will add it on the list for 7.3 Patch 1 ?

Should be fairly harmless, it's just a change in the UI how to handle scrollbars. The categories list will always show horizontal scrollbar if any item is too long to fit the window. Currently the horizontal scrollbar is showing only when the visible areas contains items that are too long.
Comment 10 everflux 2013-02-08 16:38:02 UTC
Please see screenshow 2 in bug http://netbeans.org/bugzilla/show_bug.cgi?id=225896 as well - the scroll problem seems to be not directly related to the scrollbar. (The scrolling to the bottom was possible with a larger window still(!) showing the scrollbar)

I can build core-main and test if the issue is mitigated if you like.
Comment 11 Marian Mirilovic 2013-02-08 16:53:00 UTC
(In reply to comment #10)
> I can build core-main and test if the issue is mitigated if you like.

It would be nice, thanks a lot !
Comment 12 everflux 2013-02-09 11:32:24 UTC
Tested core-main custom build (20130209-c87e1959b3bf), works perfectly well with 7u13 on Linux.
Comment 13 Quality Engineering 2013-02-10 01:41:58 UTC
Integrated into 'main-golden', will be available in build *201302092300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/c56097e8db9a
User: S. Aubrecht <saubrecht@netbeans.org>
Log: #219709 - workaround for JDK bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8003400
Comment 14 Stanislav Aubrecht 2013-02-28 13:21:00 UTC
*** Bug 202531 has been marked as a duplicate of this bug. ***
Comment 15 Marian Mirilovic 2013-03-06 17:29:18 UTC
(In reply to comment #12)
> Tested core-main custom build (20130209-c87e1959b3bf), works perfectly well
> with 7u13 on Linux.

so VERIFIED

Standa, 
I think you can proceed with integration into release73 branch. Thanks in advance.
Comment 16 Stanislav Aubrecht 2013-03-08 09:32:21 UTC
transplanted to release73 branch as 01c13a294568
Comment 17 Quality Engineering 2013-03-11 01:11:54 UTC
Integrated into 'releases', will be available in build *201303102200* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/01c13a294568
User: S. Aubrecht <saubrecht@netbeans.org>
Log: #219709 - workaround for JDK bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8003400
(transplanted from c56097e8db9a408d8d5e22cf8e9758a81413489c)
Comment 18 Marian Mirilovic 2013-03-20 13:42:47 UTC
confirmed the particular changeset was integrated into release73 branch that will be a part of NetBeans 7.3 Patch 1 codebase - verified
Comment 19 Tomas Danek 2013-03-20 15:31:23 UTC
..and I've also verified functionality in patched 7.3.
Comment 20 Stanislav Aubrecht 2013-04-05 14:41:02 UTC
*** Bug 225184 has been marked as a duplicate of this bug. ***