我想调试一下一个笔记本程序于是在JCreator里写了如下代码:
import java.awt.GridLayout;
import javax.swing.*;
public class Statusbar extends JPanel{
private JLabel lbl1,lbl2;
private Handle handle;
public Statusbar(Handle handle){
this.handle = handle;
handle.setStatusbar(this);
setLayout(new GridLayout());
lbl1 = new JLabel(" 欢迎使用本记事本程序");
lbl1.setBorder(BorderFactory.createLoweredBevelBorder());
add(lbl1);
lbl2 = new JLabel(" Ln: 1");
lbl2.setBorder(BorderFactory.createLoweredBevelBorder());
add(lbl2);
}
public JLabel getLnText(){
return lbl2;
}
}
但在我编译运行的时候就出现以的信息..而且在我运行很多其他程序的代码的时候都有这个问题..
Exception in thread "main" java.lang.NoSuchMethodError: main