Dimension buttonSize = new Dimension(bounds.width, BUTTON_HEIGHT);
getButtonUp().setBounds(transposer.t(new Rectangle(bounds.getTopLeft(), buttonSize)));
Rectangle r = new Rectangle (bounds.x, bounds.bottom() - buttonSize.height, buttonSize.width, buttonSize.height);
getButtonDown().setBounds(transposer.t(r));
Rectangle trackBounds = bounds.getCropped(new Insets(buttonSize.height, 0, buttonSize.height, 0));
RangeModel model = scrollBar.getRangeModel();
getButtonUp().setVisible(model.getValue() != model.getMinimum());
getButtonDown().setVisible(model.getValue() != model.getMaximum() - model.getExtent());
return trackBounds;
}
});
setPageUp(null);