I want my jFrame (printJFrame) to close (using the .dispose method) when the user clicks the cancel button, but idk why it isn't working. (FYI the cancelJButton is within the printJFrame class so thats why im really confused.....) Any advice?????
private void cancelJButtonActionPerformed(java.awt.event.ActionEvent evt) {
printJFrame.dispose();
}