Custom Slider UI Swing

I am trying to create my own extension BasicSliderUI. I'm just trying to make my thumb circle around (note that I'm on Windows L & F). I created a very simple implementation that just calls g.drawOval, but whenever I drag it, it leaves a β€œtrace”. Any ideas why this is?

thanks,

Jeff

0
source share
1 answer

You need to cause a redraw in all of this, you cannot just draw an oval on top. By default, Swing will only redraw what needs to be repainted, which is usually not the whole control. When do you draw a circle?

+2
source

Source: https://habr.com/ru/post/1396322/


All Articles