📜  java swing 更改标签图标 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:18.604000             🧑  作者: Mango

代码示例1
// pic is the label variable name
//b2.png is the picture 
pic.setIcon(new javax.swing.ImageIcon(getClass().getResource("b2.png")));