Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 09-09-2007, 06:25 AM   #1 (permalink)
 
Ultra Techie

Join Date: Aug 2005

Posts: 656

dnoch

Default Help needed with java

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:

Code:
button3.addActionListener(new java.awt.event.ActionListener() {
	    public void actionPerformed(java.awt.event.ActionEvent evt) {
		button3ActionPerformed(evt);
	    }
	});
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:
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
dnoch is offline  
Old 09-09-2007, 06:43 AM   #2 (permalink)
 
Ultra Techie

Join Date: Aug 2005

Posts: 656

dnoch

Default Re: Help needed with java

Hi
Just fixed it, thanks
dnoch is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dangerous Java Flaw Threatens Virtually Everything Osiris Virus - Spyware Protection / Detection 1 07-13-2007 04:44 PM
hacking online java program. Z e i g Browser & General Internet Questions 8 06-23-2007 01:50 AM
Java Game Yek Programming Discussions 5 06-16-2007 04:29 AM
Java Question PnkFloyd27 Programming Discussions 4 06-07-2007 04:30 PM
Java SCript Help NEEDED! kellee91 Browser & General Internet Questions 1 06-05-2007 12:20 PM