< prev index next >

src/java.desktop/share/classes/javax/swing/ScrollPaneLayout.java

Print this page

        

*** 819,828 **** --- 819,831 ---- * space for it (we'll make it visible later). A vertical * scrollbar is considered to be fixed width, arbitrary height. */ Rectangle vsbR = new Rectangle(0, availR.y - vpbInsets.top, 0, 0); + if(scrollPane.getClientProperty("ScrollPaneLayout.vsbAtTop") != null) { + vsbR.y = 0; + } boolean vsbNeeded; if (vsbPolicy == VERTICAL_SCROLLBAR_ALWAYS) { vsbNeeded = true; }
*** 947,956 **** --- 950,963 ---- rowHeadR.height = availR.height + vpbInsets.top + vpbInsets.bottom; rowHeadR.y = availR.y - vpbInsets.top; colHeadR.width = availR.width + vpbInsets.left + vpbInsets.right; colHeadR.x = availR.x - vpbInsets.left; + if(scrollPane.getClientProperty("ScrollPaneLayout.vsbAtTop") != null) { + vsbR.height += colHeadR.height; + } + /* Set the bounds of the remaining components. The scrollbars * are made invisible if they're not needed. */ if (rowHead != null) {
< prev index next >