Topic: 参数非法?求教高手 |
Print this page |
1.参数非法?求教高手 | Copy to clipboard |
Posted by: ice0819 Posted on: 2008-09-28 15:13
编译正确,可是运行是,提示参数非法 |
2.Re:参数非法?求教高手 [Re: ice0819] | Copy to clipboard |
Posted by: ice0819 Posted on: 2008-09-28 15:15 表情处是super(s) |
3.Re:参数非法?求教高手 [Re: ice0819] | Copy to clipboard |
Posted by: xuxiaolei Posted on: 2008-09-29 06:39
|
4.Re:参数非法?求教高手 [Re: ice0819] | Copy to clipboard |
Posted by: ice0819 Posted on: 2008-09-29 08:52 还是不行! |
5.Re:参数非法?求教高手 [Re: ice0819] | Copy to clipboard |
Posted by: xuxiaolei Posted on: 2008-09-29 09:02 但是我的就可以啊,我是JDK1.5的,下面是运行截图 s.JPG (36.38k) |
6.Re:参数非法?求教高手 [Re: ice0819] | Copy to clipboard |
Posted by: JiafanZhou Posted on: 2008-09-29 16:24 This is the error log when I run it in jdk6
can you see where the problem is, it is quite obvious? xuxiaolei's code is much better and reliable. Regards, Jiafan |
7.Re:参数非法?求教高手 [Re: ice0819] | Copy to clipboard |
Posted by: ice0819 Posted on: 2008-09-29 16:35 因为add.(button,"North") 与add(button,BorderLayout.NORTH)是等效的,所以我在给数组中元素赋值的时候就简略了。可是忘了,数组中的元素取出来的时候是没有引号的。改过来了,可以了。谢谢大家 |
8.Re:参数非法?求教高手 [Re: ice0819] | Copy to clipboard |
Posted by: JiafanZhou Posted on: 2008-10-01 18:39 > 因为add.(button,"North") 与add(button,BorderLayout.NORTH)是等效的 You should rather use BorderLayout.NORTH then "North". They are not equal, above all one injects error while the other one does not. |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |