문제

I am trying to do my own program and what the basis of what I want is to use some sort of slider to take characters to different buildings. I essentially have a one long vertical road with my bus (which is what the slider will be). I know the general icon for a JSlider is a small pentagon that can be dragged to different values. I was just wondering, is there a way to change that pentagon icon into something of my choice?

도움이 되었습니까?

해결책

You'll need to extend the BasicSliderUI and override paintThumb() to render the desired Shape. This example renders a triangle using drawLine().

image

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top