Asked by duncanb7
at 2024-06-09 15:41:29
Point:500 Replies:14 POST_ID:828330USER_ID:11059
Topic:
Java Programming Language;;
: I hav ran javac command many times on the following code, there is still last error left.
The error is at last line in attahced code about not finding the symbol of
getContentPane().add(panel,BorderLayout.CENTER); I already include
everything of java at the begining line of the code but still get the following
error.
Please help on this, and I suspect I use wrongly code about "public static void main(String[] args) { " at the last serveral lines in the code That may be bad code when I am using Applet to display the chart output result in IE with HTML code
Why Javac could not find out the symbol of getCOntentPane() ? That is
supposed not too difficult ..Right ? Or Is the error related to JPanel();
And other question , html code I write at last line of this email is problem
regardless of my code of Java code of "simplearea.java"
Please kindly advise and help on it
Duncan
==============================================
javac Error:
D:wkwSummaryINTERN~1CHART-~1javademo>javac -classpath "ChartDirector_s.jar;." simplearea.java
simplearea.java:95: cannot find symbol
symbol : method getContentPane()
location: class simplearea
getContentPane().add(panel,BorderLayout.CENTER);
^
1 error
==========
I want use HTML code with Applet to display chart output result in IE as follows:
<HTML>
<HEAD>
<TITLE>A Simplearea (1.6)</TITLE>
</HEAD>
<BODY>
<h1>A Simplearea (1.6)</h1>
<hr>
<applet code="simplearea.class" archive="ChartDirector_s.jar" width=170 height=150>
alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason."
Your browser is completely ignoring the <APPLET> tag!
</applet>
</BODY>
</HTML>
==================================
The error is at last line in attahced code about not finding the symbol of
getContentPane().add(panel,BorderLayout.CENTER); I already include
everything of java at the begining line of the code but still get the following
error.
Please help on this, and I suspect I use wrongly code about "public static void main(String[] args) { " at the last serveral lines in the code That may be bad code when I am using Applet to display the chart output result in IE with HTML code
Why Javac could not find out the symbol of getCOntentPane() ? That is
supposed not too difficult ..Right ? Or Is the error related to JPanel();
And other question , html code I write at last line of this email is problem
regardless of my code of Java code of "simplearea.java"
Please kindly advise and help on it
Duncan
==============================================
javac Error:
D:wkwSummaryINTERN~1CHART-~1javademo>javac -classpath "ChartDirector_s.jar;." simplearea.java
simplearea.java:95: cannot find symbol
symbol : method getContentPane()
location: class simplearea
getContentPane().add(panel,BorderLayout.CENTER);
^
1 error
==========
I want use HTML code with Applet to display chart output result in IE as follows:
<HTML>
<HEAD>
<TITLE>A Simplearea (1.6)</TITLE>
</HEAD>
<BODY>
<h1>A Simplearea (1.6)</h1>
<hr>
<applet code="simplearea.class" archive="ChartDirector_s.jar" width=170 height=150>
alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason."
Your browser is completely ignoring the <APPLET> tag!
</applet>
</BODY>
</HTML>
==================================