带星号的部分是它显示的错误。谁能向我解释为什么会这样?一开始我已经有一个公共课。如果我去掉括号“()”,后面的代码都会显示错误。谢谢!
public class ButtonTester {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
new adasdad();
}
//Setting up variables
private static final int FRAME_WIDTH = 500;
private static final int FRAME_HEIGHT = 600;
private JButton button = new JButton ("A");
private JButton button2 = new JButton ("B");
**class ExP12_4 () {**
//Creating a frame
//Creating a panel
...
...
//Display frame
...
}