ImageIcon i = new ImageIcon("resources/images/2Neighbours.png");
JButton newButton = new JButton(i);
ImageIcon j = new ImageIcon("resources/images/3Neighbours.png");
newButton.setIcon(j);
.png文件是彩色的但是当我在java中运行时,图像是灰度的?
可能是因为我有JButton.setEnabled(false)吗?
![正在运行代码] http://imgur.com/8T7P5P0