我有这种情况(JSlider在不需要时显示值)。而且我不想在JSlider上显示当前的价值。
答案 0 :(得分:2)
public static void changeLAF(Container container, String laf) {
try {
UIManager.setLookAndFeel(laf);
UIManager.put("Slider.paintValue", false);
} catch (ClassNotFoundException | InstantiationException |
IllegalAccessException | UnsupportedLookAndFeelException e) {
}
SwingUtilities.updateComponentTreeUI(container);
}