protected void configureScrollBarColors() { super.configureScrollBarColors(); // The following is a bit of a hack to force the size of the scrollbar. boolean isVertical = (this.scrollbar.getOrientation() == NORTH || this.scrollbar.getOrientation() == SOUTH); Dimension size = this.scrollbar.getPreferredSize(); if (isVertical) { size.width = this.scrollBarWidth; } else { size.height = this.scrollBarWidth; } this.scrollbar.setPreferredSize(size); }