I\'m creating a gui application that requires some simple input, however, when I click the button in the JFrame the actionPerformed method I\'m using is not fired/firing (no
You need to add an action listener to your button component like this.
closeButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
closeButtonActionPerformed(evt);
}
});
private void closeButtonActionPerformed(java.awt.event.ActionEvent evt) {
dispose();
}