请问如何让button上的文字不显示。。。。。谢谢。。。。。
[b]问题补充:[/b]
是java。swing中的jbutton组件
setLabel("")
设置为""...
另外,你问的是html? java? 天外飞仙?
setText(null)
或者初始化JButton的时候使用
[code="java"]
/**
* Creates a button with no set text or icon.
*/
public JButton() {
this(null, null);
}
/**
* Creates a button with an icon.
*
* @param icon the Icon image to display on the button
*/
public JButton(Icon icon) {
this(null, icon);
}
[/code]
这两个构造方法,反正不要设置text就可以了
buttonName.setText(""); //将text属性设置为空字符串