Java摆动范围滑块U.I [英] Java Swing Range Slider U.I

查看:93
本文介绍了Java摆动范围滑块U.I的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个带有两个旋钮的滑块(代表一个范围),我发现这个漂亮的这里.但是,他们创建了自己的U.I.扩展了Java的 BasicSliderUI .他们将覆盖绘画方法以绘制自己的旋钮.我想使用基于当前外观的默认旋钮.我尝试调用 BasicSliderUI JSlider 获取其UI来自 MultiSliderUI .如何创建更改为 JSlider的UI ,但是画两个旋钮而不是一个?

I needed a slider with two knobs on it (representing a range) and I found this nifty one here. However, they created their own U.I. which extends Java's BasicSliderUI. They override the paint method to draw their own knobs. I would like to use the default knobs based on the current look and feel. I tried calling BasicSliderUI's paintThumb method, but this gives me a generic looking knob which doesn't seem to be tied to the current look and feel. As far as I can tell, JSlider gets its U.I. from MultiSliderUI. How can I create a U.I which changes like JSlider's, but draws two knobs instead of one?

提前谢谢!

推荐答案

SwingX 提供了

SwingX provides JXMultiThumbSlider which may be what you are looking for.

这篇关于Java摆动范围滑块U.I的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆