小弟新手,不要怕问题简单啊
这可是我照抄的程序,但是不明白报的是什么错,大家指点一下
Note: Memo.java uses a deprecated API. Recompile with "-deprecation" for details
import java.awt.*;
public class Memo extends Frame{
public String motd;
public Memo(String s){
//set out title
super("Memo Frame");
motd=s;
resize(300,300);
}
public Memo(){
this("This is a Memo");
}
public void paint(Graphics g){
g.drawString(motd,15,15);
g.drawString("Click anywhere to Exit",15,25);
}
public void start(){
show();
}
public boolean mouseDown(Event e,int x,int y){
//hide the window
hide();
//free up system resource
dispose();
//Quit the app
System.exit(0);
return false;
}
public static void main(String args[]){
Memo m;
if (args.length>0){
m = new Memo(args[0]);
}
else{
m = new Memo();
}
m.start();
}
}