JLabel中如何假如图片
请问JLable中除了下列方法假如图片,还有没有其他的途径或者说是JLable中有没有的内部方法直接调用。
ImageIcon go_offimage=new ImageIcon("Images/go_off.gif");
JLable lable=new JLable(go_offimage);
搜索更多相关的解决方案:
JLabel
----------------解决方案--------------------------------------------------------
JLabel label = new JLabel (new ImageIcon ("Images/go_off.gif"));
----------------解决方案--------------------------------------------------------
setIconpublic void setIcon(Icon icon)
- Defines the icon this component will display. If the value of icon is null, nothing is displayed.
The default value of this property is null.
This is a JavaBeans bound property.
-
-
----------------解决方案--------------------------------------------------------
public void setIcon(Icon icon)
- Defines the icon this component will display. If the value of icon is null, nothing is displayed.
The default value of this property is null.
This is a JavaBeans bound property.