Topic: 求助~~~~~~~~~~~这2个语法是一样的????

  Print this page

1.求助~~~~~~~~~~~这2个语法是一样的???? Copy to clipboard
Posted by: 19850225
Posted on: 2005-01-20 14:42

panelObject=(JPanel)getContentPane();
getContentPane().add(panelObject);

第1个语法看不懂,高手能否解释一下????????/

2.Re:求助~~~~~~~~~~~这2个语法是一样的???? [Re: 19850225] Copy to clipboard
Posted by: lover
Posted on: 2005-01-20 20:41

getContentPane()返回的是Container
JPanel 是Container的子类,所以用(Jpanel)造型转换。


   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