코딩에 관해서 질문드려요~
은솜
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class D extends Applet implements Runnable {
Button button1 = new Button(첫번째버튼);
Thread th;
public int i;
public void init() {
button1.addActionListener(new Button1Listener());
add(button1);
th = new Thread(this);
th.start();
}
public void run() {
try {
for(i = 0; i 800; i++) {
repaint();
Thread.sleep(50);
}
}
catch(Exception e) {
;
}
}
class Button1Listener implements ActionListener {
public void actionPerformed(ActionEvent e) {
g.setColor(Color.red);
g.fillArc(250,100,150,150,5*i,30);
repaint();
}
}
public void paint(Graphics g) {
Dimension d = getSize();
Font font = new Font(Courier, Font.BOLD,36);
g.setFont(font); }
}=====================================================
g.setColor(Color.red);
g.fillArc(250,100,150,150,5*i,30);
repaint();
여기서 이부분이 오류가 나는데요
여기 위에더 어떻게 선언을 해줘야 되는거에요