シンボルが見つけられません。 8個のエラーメッセージがでました。 何度も打ち直しましたが、これ以上減りません。 ドコが誤ってますか? ご多忙中申し訳ありません。 ご回答の程、宜しくお願い申し上げます。 import java.applet.*; import java.awt.*; import java.util.*; public class DigitalClock extends Applet implements Runnable { Thread thread = null; Image Digit[ ] = new Image[11]; int DigitWidth, DegitHeight; Image WorkImage; Graphics WorkGraphics; int AppletWidth, AppletHight; //初期化処理---------------------------------------------------- public void init() { AppletWidth = getSize().width; AppletHight = getSize().height; WorkImage = createImage(AppletWidth, AppletHight); WorkGraphics = WorkImage.getGraphics(); MediaTracker mediaTracker = new MediaTracker(this); for(int i = 0; i < 11;i++) { Digit[i] = getImage(getCodeBase(),"Image/" + i +".gif"); mediatracker.addImage(Digit[i],1); } try{ mediatracker.waitForID(1); } catch (InterruptedException e) { showStatus(""+e); } DigitWidth = Degit[0].getWidth(this); DegitHeight = Digit[0].getHeight(this); } //アプレット開始------------------------------------------------------- public void start() { thread = new Thread(this); thread.start(); } //描画処理-------------------------------------------------------------- public void paint(Graphics g) { g.drawImage(WorkImage, 0, 0, this); } //スレッド処理------------------------------------------------------------ public void run(){ while (thread != null) { DispTime(); repaint(); try { thread.sleep(100); } catch(InterruptedException e) { showStatus(""+e); } } } //描画更新処理再定義---------------------------------------------------------- public void update(Graphics g) { paint(g); } //時間描画-------------------------------------------------------------------- void DispTime() { //カレンダーオブジェクト作成 Calendar date = Calendar.getInstance(TimeZone.getTimezone("JST")); int hour = date.get(Calender.HOUR); int minute = date.get(Calender.MINUTE); int second = date.get(Calendar.SECOND); //作業グラフィックに描画 WorkGraphics.setcolor(color.white); WorkGraphics.fillRect(0, 0, DigitWidth*8, DigitHight); int h1 = hour / 10, h2 = hour % 10; WorkGraphics.drawImage(Digit[h1], 0,0, this); WorkGraphics.drawImage(Digit[h2], DigitWidth*1, 0, this); WorkGraphics.drawImage(Digit[10], DigitWidth*2, 0, this); int m1 = minute / 10, m2 = minute % 10; WorkGraphics.drawImage(Digit[m1], DigitWidth*3, 0, this); WorkGraphics.drawImage(Digit[m2], DigitWidth*4, 0, this); WorkGraphics.drawImage(Digit[10], DigitWidth*5, 0, this); int s1 = second / 10, s2 = second % 10; WorkGraphics.drawImage(Digit[s1], DigitWidth*6, 0, this); WorkGraphics.drawImage(Digit[s2], DigitWidth*7, 0, this); } //アプレット停止 public void stop() { thread = null; } }
↧