Home arrow static arrow Java Programming [Archive] - Another help
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Another help
This topic has 3 replies on 1 page.

Posts:35
Registered: 7/16/04
Another help  
Jul 30, 2004 4:43 AM



 
// I define a var as :
private Container con =getContentPane ();
......
when compiled ,err msg raised as following :

examples/Viaphone/InnerClass/FrameTestInnerClass.java [19:1] No method found matching getContentPane()
private Container con =getContentPane ();
^
examples/Viaphone/InnerClass/FrameTestInnerClass.java [19:1] Cannot parse initializer
private Container con =getContentPane ();
^
2 errors

Help

 

Posts:2,909
Registered: 13.8.2003
Re: Another help  
Jul 30, 2004 4:46 AM (reply 1 of 3)



 
Do you extend JFrame?
 

Posts:35
Registered: 7/16/04
Re: Another help  
Jul 30, 2004 6:08 AM (reply 2 of 3)



 
Yes ! I have done this !
 

Posts:2,909
Registered: 13.8.2003
Re: Another help  
Jul 30, 2004 6:18 AM (reply 3 of 3)



 
In the same class where you use getContentPane() ?

Because Java is saying that you haven't and you're saying you have.
Guess who I will trust?

Are you doing it in an inner class?
 
This topic has 3 replies on 1 page.