Hello,

please review a fix for JDK 9.

Bug: https://bugs.openjdk.java.net/browse/JDK-4473075
Webrev: http://cr.openjdk.java.net/~alexsch/semyon-sadetsky/4473075/webrev.00/

The thing is the general logic of the viewport layout requires the right component size which is requested by the getPreferredSize call to the child component. The right width of JTableHeader should be calculated in its UI but if user sets the preferred size manually it makes the calculated size invisible outside the component. User may need to set preferred size in order to adjust header height but in setPreferredSize(Dimension) the header width is adjusted as well. The fix solution overrides JComponent::getPreferredSize in JTableHeader with the logic returning the right width while preserving the height adjustable for user.


Reply via email to