本文整理了Java中javax.swing.JSlider.setForeground()
方法的一些代码示例,展示了JSlider.setForeground()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSlider.setForeground()
方法的具体详情如下:
包路径:javax.swing.JSlider
类名称:JSlider
方法名:setForeground
暂无
代码示例来源:origin: de.sciss/prefuse-core
/**
* @see java.awt.Component#setForeground(java.awt.Color)
*/
public void setForeground(Color c) {
m_field.setForeground(c);
m_label.setForeground(c);
m_slider.setForeground(c);
super.setForeground(c);
}
代码示例来源:origin: atarw/material-ui-swing
@Override
public void installUI (JComponent c) {
super.installUI (c);
JSlider slider = (JSlider) c;
slider.setFont (UIManager.getFont ("Slider.font"));
slider.setBackground (UIManager.getColor ("Slider.background"));
slider.setForeground (UIManager.getColor ("Slider.foreground"));
slider.setBorder (UIManager.getBorder ("Slider.border"));
}
代码示例来源:origin: Exslims/MercuryTrade
public JSlider getSlider(int min, int max, int value) {
JSlider slider = new JSlider(JSlider.HORIZONTAL, min, max, value);
slider.setMajorTickSpacing(10);
slider.setMinorTickSpacing(1);
// slider.setPaintLabels(true);
// slider.setUI(new WindowsSliderUI(slider));
slider.setForeground(AppThemeColor.TEXT_DEFAULT);
slider.setFont(REGULAR_FONT.deriveFont(15f));
slider.setRequestFocusEnabled(false);
slider.addMouseMotionListener(new MouseMotionAdapter() {
@Override
public void mouseDragged(MouseEvent e) {
slider.getParent().repaint();
}
});
slider.setBackground(AppThemeColor.FRAME);
return slider;
}
内容来源于网络,如有侵权,请联系作者删除!