Re: [問題] 錯誤訊息.....
課本好像是直接跑的 我把這個檔案用html的格式也沒有辦法在網頁中顯示
.....奇怪...
※ 引述《Nt1 (用功點吧!)》之銘言:
: 唔…? Applet不是要鑲進到 html 中才能看的到嗎?
: 放到 html 中用 appletviewer 或 ie 看看吧@@"
: ※ 引述《kingbody (回想)》之銘言:
: : Exception in thread "main" java.lang.NoSuchMethodError: main
: : 我的程式碼如下:
: : ______________________________
: : import java.awt.Graphics;
: : import javax.swing.JApplet;
: : public class Draw extends JApplet {
: : public void paint (Graphics g)
: : {
: : super.paint(g);
: : int counter = 1;
: : do{
: : g.drawOval(110 - counter * 10, 110 - counter * 10,counter * 20,cou\
: : nter * 20);
: : ++counter;
: : }while (counter <= 10);
: : }
: : }
: : ______________________________
: : 是按照書上的範例 但是不知道為什麼 出現上面的錯誤....
: : 但是我跑 其他java程式可以跑的說 請知道的人告知ㄧ下 感謝啦
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.231.11.26
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 4 之 9 篇):