Trying to make a JButton to close the application. This is the code I have
closeJButton = new JButton();
closeJButton.setBounds(280, 200, 80, 20);
closeJButton.setFont(new Font("Default", Font.PLAIN, 12));
closeJButton.setText("Close");
closeJButton.setForeground(black);
closeJButton.setBackground(white);
contentPane.add(closeJButton);
closeJButton.addActionListener(e->System.exit(0));
new ActionListener()
{
public void actionPerformed(ActionEvent event);
{
closeJButtonActionPerformed(event);
}
}
);
It is saying that
closeJButtonActionPerformed(event);
}
} <------------------- AddNumbers.java:160: error: ';' expected
}
);
What am I doing wrong this is all I have left to do please help me