Re: Error in ActionListener
its hard to trace the error you are mentioning because your code seems incomplete
for example your method DemoForm is outside the scope of any class and then you have class thehandler that implements actionListener
basically you just have this:
Code:
DemoForm()
class handler{
actionPerformed()
}
when you should have something like this:
Code:
class form{
demoForm()
}
class handler{
actionPerformed()
}
//and a main method withing a tester class to test your form and handler Class
class testClass{
public static void main(String[] args) {
//code use for testing
}
}
Re: Error in ActionListener
Please post the whole class remembering to use code tags.
The error message shown is a run time error saying the code could not be compiled which suggests you are attempting to run an invalid class ie the last compile cycle failed. Are you sure you successfully compiled the class after your last changes?
BTW are you using an IDE or compiling and running from the command line.