显示图片和按钮

Jimin 2003-10-22 01:49:26
请问如何显示图片和按钮
...全文
57 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
super_jack 2003-10-22
  • 打赏
  • 举报
回复
Button btn=new Button("cancel");
add(btn);
司码君 2003-10-22
  • 打赏
  • 举报
回复
jButton1.setText(null);
jButton1.setIcon(createImageIconRemote(iconGathering, ""));

/**
* read icon image from remote server
*/
public ImageIcon createImageIconRemote(String url, String description) {
try {
return new ImageIcon(new URL(url), description);
} catch (java.net.MalformedURLException e) {
}
return null;
}

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧