私はこのコードを持っています。Eclipse は構文が正しいことを通知しますが、プログラムを実行すると次のエラーが表示されます。
スレッド「メイン」での例外 java.lang.NoSuchMethodError: main
どうしたの?
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
public class Main extends JFrame {
    private static final long serialVersionUID = 1L;
    public void main(String[] args){
        JFrame Main = new JFrame("TEST");
        Main.setSize(600, 600);
        Main.setLocationRelativeTo(null);
        Main.setVisible(true);
        Main.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Adding JPanel     
        JPanel panel = new JPanel();
        Main.add(panel);
//JPanel settings
        panel.setLayout(null);
        panel.setBackground(Color.GREEN);
//Adding JButton
        JButton button = new JButton("Button 1");
        JButton button2 = new JButton("Button2");
        panel.add(button);
        panel.add(button2);   
//Button action
        button.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent e) {
        JPanel panel = new JPanel();
        JPanel panel2 = new JPanel();
        Main.this.getContentPane().remove(panel);
        Main.this.getContentPane().add(panel2);
        Main.this.getContentPane().validate();      
    }
});
//JButton settings
        button.setBounds(70, 160, 200, 200);
        button2.setBounds(320, 160, 200, 200);  
    }
}