Must implement ActionListener.actionPerformed( ActionEvent )
问题 package helloworld; import javax.swing.*; import java.awt.event.*; public class helloworld extends JFrame{ public static void main( String args[] ){ JFrame frame = new helloworld(); frame.setSize( 400, 200 ); frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); frame.setTitle( "HelloWorld" ); JPanel panel = new Panel(); frame.setContentPane( panel ); frame.setVisible( true ); } } class Panel extends JPanel { private JButton button, resetbutton; private JTextField textfield; public Panel(){