如何在整个JPanel (包括JLabel图标)顶部设置透明的红色?我有透明背板颜色为面板,但我希望整个面板,包括图片和一切都得到这个透明的颜色。就像JPanel顶部的透明彩色玻璃import java.awt.image.BufferedImage;import java.net.MalformedURLException;
i
编辑:对不起,这个问题有点误导:所有外观和感觉的变化都发生在显示面板的之前,如示例代码所示。这个问题的根本原因是,我需要向面板中添加一个填充了背景颜色的JButton,而setBackground在使用windows look and feel时只设置JButton的边框,而cross platformlook and feel则填充背景。import java.awt.Color;import javax.swin