Hi all
Im busy writing this program for my computers major project, and im having a bit of trouble throwing the IOException. Here is an extract of my code:
Since i have a file writer within the method that button3 calls (note that this is a gui, not text based), it is giving me an error that that method must throw the IOException, yet if i throw the IOException, it gives me the following error:
I tried putting it in a try catch statement, but netBeans won't allow me to do that.
If anyone knows where i should go from here, i would be grateful for any tips or advice.
Thank you in advance
Im busy writing this program for my computers major project, and im having a bit of trouble throwing the IOException. Here is an extract of my code:
Code:
button3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button3ActionPerformed(evt);
}
});
Code:
actionPerformed(java.awt.event.actionEvent) in cannot implement actionPerformed(java.awt.event.actionEvent) in java.awt.event.actionListener ; overriden method does not throw java.io.IOException
I tried putting it in a try catch statement, but netBeans won't allow me to do that.
If anyone knows where i should go from here, i would be grateful for any tips or advice.
Thank you in advance