Customise JScrollBar arrow
I would like to create JScrollBar with increase and decrease buttons at the bottom in case of vertical scrollbar as shown in the image attached. (Mac OS Style)
I need something like
------------O--------开发者_开发百科---<>
instead of
<----------O-------------->
Could you please help me with this?
Take a look at the source code for the ScrollBarUI or one of the L&F implementations, to see how the individual Look And Feel classes achieve what they achieve. You will then need to re-write the paint method to draw your version.
here is the source code for the BasicL&F.
However, I would also suggest searching for a L&F that already does this, as I am sure someone has already done this in one of the L&F platforms.
精彩评论