主题:[转帖]调试问题
调试以下程序,显示会出现Exception in thread"main" java.lang.NoClassDefFoundEr的错误,不知什么原因
import java.applet.*;
import java.awt.*;
public class Example1_2 extends Applet
{
public void paint(Graphics g)
{int x=2,y=1;
switch(x+y)
{
case 1: g.setColor(Color.red);
g.drawString("i am 1",5,10);
break;
case 2: g.setColor(Color.blue);
g.drawString("i am 2",5,10);
break;
case 3: g.setColor(Color.green);
g.drawString("i am 3",5,10);
break;
default: g.drawString("没有般配的",5,10);
}
}
}
import java.applet.*;
import java.awt.*;
public class Example1_2 extends Applet
{
public void paint(Graphics g)
{int x=2,y=1;
switch(x+y)
{
case 1: g.setColor(Color.red);
g.drawString("i am 1",5,10);
break;
case 2: g.setColor(Color.blue);
g.drawString("i am 2",5,10);
break;
case 3: g.setColor(Color.green);
g.drawString("i am 3",5,10);
break;
default: g.drawString("没有般配的",5,10);
}
}
}