【发布时间】:2012-08-24 12:37:05
【问题描述】:
为挥杆动作设置图像:
Action action = ...
// ImageIcon icon = new ImageIcon(getClass().getResource("/icon.ico"));
ImageIcon icon = new ImageIcon(getClass().getResource("/icon_16x16.png"));
action.putValue(Action.SMALL_ICON, icon);
*.ico 文件不会被渲染,只有 png/jpg。
这是设计使然吗?
【问题讨论】: