Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我更改 JSlider 上的主要刻度时,标签(如果绘制)不会改变。
我有这种情况
我改变了主要的刻度间距
jSlider.setMajorTickSpacing(20);
我得到这个
如何获得这种情况?
您也必须更改标签。尝试这个
jSlider.setMajorTickSpacing(20); jSlider.setLabelTable(jSlider.createStandardLabels(20));