| 编程中国 | 业界新闻 | 技术文章 | 视频教程 | 下载频道 | 程序源码 | 个人空间 | 编程论坛
全能ASP/PHP/ASP.NET主机,支持月付专业 MSSQL 数据库空间,支持月付专业 MySQL 数据库空间,支持月付赛孚耐:软件保护加密专家
身份认证令牌USB KEY   
共有 235 人关注过本帖
标题:JLabel中如何假如图片
收藏  订阅  推荐  打印 
jonc
Rank: 2
等级:注册会员
帖子:69
积分:798
注册:2007-3-25
JLabel中如何假如图片

请问JLable中除了下列方法假如图片,还有没有其他的途径
或者说是JLable中有没有的内部方法直接调用。
ImageIcon go_offimage=new ImageIcon("Images/go_off.gif");
JLable lable=new JLable(go_offimage);
搜索更多相关主题的帖子: JLabel  
2007-5-17 20:30
ck0311
Rank: 2
等级:注册会员
帖子:96
积分:1078
注册:2007-2-13

JLabel label = new JLabel (new ImageIcon ("Images/go_off.gif"));

2007-5-17 20:54
Eastsun
Rank: 12Rank: 12Rank: 12
等级:贵宾
威望:32
帖子:801
积分:8542
注册:2006-12-14

setIcon

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.

See Also:
setVerticalTextPosition(int), setHorizontalTextPosition(int), getIcon()


My BlogClick Me
2007-5-17 22:36
关于我们 | 广告合作 | 编程中国 | 清除Cookies | Archiver | WAP | TOP

编程中国 版权所有,并保留所有权利。鲁ICP备08000592号
Powered by Discuz, Processed in 0.057528 second(s), 9 queries.
Copyright©2004-2008, BCCN.NET, All Rights Reserved