[英]How can I change the foreground color of a text based on the background it is on?
[英]How can i change JDateChooser background and foreground color
使用以下代码更改 jdatechooser 背景:
for( Component c : jDateChooser1.getComponents()){
((JComponent)c).setBackground(Color.RED);
}
for( Component c : jDateChooser2.getComponents()){
((JComponent)c).setBackground(Color.RED);
}
示例图片的结果:在此处输入图片描述
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.