JDK-8195738 : scroll position in ScrollPane is reset after calling validate()
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7,8,9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-01-19
  • Updated: 2019-01-14
  • Resolved: 2018-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 7 JDK 8
11 b05Fixed 7u201Fixed 8u192Fixed
Description
The position of java.awt.Scrollpane is reset to an initial position 
after calling validate() method with setting SCROLLBARS_NEVER. 

It is likely to be a bug in ScrollPane.  The reason is that the validate() method
eventually calls Win32 API SetScrollInfo(), which resets the position .  It is
always called even when the scroll bar is not displayed. 
Comments
Webrev for review (8u-backport) - http://cr.openjdk.java.net/~dkumar/8195738/webrev.00/ Patch pushed for JDK 11 applies cleanly to JDK 8 after adjusting file path except 'headful' keyword has been removed from the test as this is not defined for 8. Related Jtreg tests have been run against the proposed patch and results are fine.
14-03-2018

Put for review and here is the webrev for it: http://cr.openjdk.java.net/~sveerabhadra/8195738/webrev.00/
20-02-2018