Hey, I'm trying to design a simple interface and I'm getting this
error:
actionPerformed(java.awt.event.ActionEvent) in GUI cannot implement
actionPerformed(java.awt.event.ActionEvent) in
java.awt.event.ActionListener; overridden method does not throw
java.io.IOException
public void actionPerformed(ActionEvent event)
I'm sure this is fairly simple but i'm relatively new to java and
can't work it out!
The code for actionPerformed is as follows, where GetContent and
CompareFiles are outside classes which deal with the URL and GUI is
the name of the overall class...
-----------------------------
public void actionPerformed(ActionEvent event)
throws MalformedURLException, IOException {
try {
URL url = new URL(enterURL.getText());
URLConnection connection = url.openConnection();
GetContent gc = new GetContent();
CompareFiles cf = new CompareFiles();
}
catch (MalformedURLException err)
{
System.err.println("Usage: java URLApp
http://www.URL.com");
}
catch (IOException e)
{
System.err.println("Run software again to check if
content has changed.");
}
-----------------------------
Thanks a lot,
Geoff