jLabelStep1.setForeground(new Color ( 255,255,255 ));
timeDelay (2);
jLabelArrow1.setForeground(new Color ( 255,255,255 ));
代码前后都省略了,原意是先更改jLabelStep1的前景,2秒后更改jLabelArrow1的前景。这段程序是在一个按钮事件里写的。但是我所做的更改不能立刻实现,一定等到程序走出了按钮事件后才实现了setForeground .我曾经尝试了在jLabelStep1.setForeground(new Color ( 255,255,255 )); 后面插入jContentPaneProceed.validate  (这两个组件在这个容器里)。也没有效果。但是在后面插入JOptionPane.showMessageDialog便会有效。不知有没有其他办法。另注延时没问题。