how to have jslider's track below the knob's image and how to fill colours in track on Slider's knob movement?
HI All,
i need to put jSlider's track below the knob's image and fill different colours in track on Slider's knob movement.
Please explain with some code snippets.
Thanks Jyo开发者_如何学JAVAti
That all falls in the realm of Look And Feel (LAF). The LAF in use controls how the component is rendered. So, a GTK LAF will present it so it looks like the rest of GTK, the WinXP LAF will give it the Windows XP appearance, etc.
The best bet for the look you describe is the Synth LAF which reads an xml file to configure how it should present the control.
Here is an IBM developerWorks article on using Synth. And, here is a blog post by Romain Guy on some of the gotchas encountered using Synth. In particular, the comments about skinning a scroll bar may apply to a slider as well.
精彩评论