|
|
问题解决.删
[ 本帖最后由 L3MoN_TeA 于 21-2-2009 02:25 PM 编辑 ] |
|
|
|
|
|
|
|
|
|
|
发表于 21-2-2009 01:14 AM
|
显示全部楼层
原帖由 L3MoN_TeA 于 20-2-2009 05:59 PM 发表 
为什么main1的button不能update main的label的?谢谢帮忙

main:
package test1;
public class main extends javax.swing.JFrame {
publ ...
看到你的code,我差点要晕掉!!
1)不要用关键字“main" 来做你的class 名
比如用 “MyClass1"
2)你call main1 时,要把 ‘this'=自己 pass 进去
main11.main1(this);
3)改改你的 public void main1()
成为:
public void main1(MyClass1 myClass1) {
this.myClass1 = myClass1;
this.setVisible(true);
}
多加努力! |
|
|
|
|
|
|
|
|
|
|
发表于 21-2-2009 01:53 PM
|
显示全部楼层
原帖由 winmxaa 于 21-2-2009 01:14 AM 发表 
看到你的code,我差点要晕掉!!
1)不要用关键字“main" 来做你的class 名
比如用 “MyClass1"
我已经晕掉。。。现在是一小时后醒来写的 |
|
|
|
|
|
|
|
|
|
|
发表于 21-2-2009 02:19 PM
|
显示全部楼层
回复 3# yeenfei 的帖子
我不会看wizard code, 通常用自己的写法, 帮不了你 |
|
|
|
|
|
|
|
|
| |
本周最热论坛帖子
|