This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
is this possible? I have a listener class that implements ActionListener. In this class, I implement the actionPerformed method. I will attach the listener class to a button, so whenever I click on the button, the actionPerformed method will be invoked. Now, in this method, there will be code that will throw exceptions (possibly maybe reading a file, IOException) But actionPerformed signature does not allow it to throw exceptions. The compiler keeps on complaining. How do I solve this problem?
But actionPerformed signature does not allow it to throw exceptions.
You don't have much of a choice. You must catch your exceptions inside a try catch block and handle everything there since you cannot rethrow the exception. -anthony [ March 29, 2002: Message edited by: Anthony Villanueva ]