@Override public void setBounds(int x, int y, int width, int height) { Component p = getParent(); if (p instanceof ScrollPaneEx) { ScrollPaneEx pane = (ScrollPaneEx) p; if (pane.hasScrollPaneRowHeader() && (pane.getRowHeader() == this)) { viewportWidth = width; return; } } super.setBounds(x, y, width, height); }
protected void setScrollPaneRowHeaderBounds() { ScrollPaneEx pane = (ScrollPaneEx) getParent(); JViewport vp = pane.getViewport(); JViewport ch = pane.getColumnHeader(); pane = (ScrollPaneEx) getView(); JViewport ch2 = pane.getColumnHeader(); int y; int h = vp.getHeight(); if ((ch != null) && ch.isVisible() && (ch2 != null) && ch2.isVisible() && (viewportWidth > 0)) { y = ch.getY(); h += ch.getHeight(); } else { y = vp.getY(); } super.setBounds(vp.getX() - viewportWidth, y, viewportWidth, h); }