...果想重新计算JFrame(框架)中所有组件的大小应该使用名为validate方法,因为JFrame并不继承于JComponent类 使用setText(字符串),这个方法定义在JTextComponent类中,与getText方法对应 getText().
基于6个网页-相关网页
void SetText 设置按钮文本
setText text 设置显示的文本值 ; 设置文本值 ; 设置输入的文本
setText SetText 设置文本内容
SetText ofLayer 设置层文本
As you can see, SAP passwords are recorded as text: _rsystbcode().setText(********).
正如您所见,SAP 密码被记录为:_rsystbcode().setText(********) 文本格式。
So, in the case of a JButton, if the third argument was text, then this would equate to a setText() call, where the argument to the method was represented by the String sent into the fourth argument.
所以,对于 JButton ,如果第三个参数是 text ,那么这相当于一个 setText() 调用,该方法所需要的参数是由传递给第四个参数的 String 来表示的。
应用推荐