新闻正文
我新建的一个BigDebtApplet.java文件:
import java.awt.*;
public class BigDebtApplet extends com.java.swing.JApplet{
int debt;
public void init(){
debt=446000000;
debt=debt/1440;
}
public void paint(Graphics screen){
super.paint(screen);
Graphics2D screen2D=(Graphics2D)screen;
screen2D.drawString("A minute"s worth of debt is $" +debt, 5,50);
}
}
然后用javac BigDebtApplet.java后出现下列错误
BigDebtApplet.java:3: package com.java.swing does not exist
public class BigDebtApplet extends com.java.swing.JApplet{
^
BigDebtApplet.java:11: cannot resolve symbol
symbol : variable super
location: class BigDebtApplet
super.paint(screen);
^
2 errors
请问是什么回事,要怎么解决啊,谢谢!
收藏到ViVi 收藏此页到365Key
上一篇:
java.sql.SQLException: General error 为什么? 下一篇:
那位有基于SNMP协议的JAVA编程方面的代码或资料请RE