length () error !!!
Hi
when i clicked an exit button inside ActionListener the program will automatically quits...
Ok , i add a JTextArea in main function did so...
String textenter = textarea.getText();//textarea object of JTextArea
int len = textenter.length();
i calculates the length of textarea...
and when user clicks exit button..
class ExitListenerimplements ActionListener
{
publicvoid actionPerformed(ActionEvent evtexit)
{
if(len >=1)
{
System.out.println("Success " + len);
}
}
}
But i am getting errors its not calculating length at runtime....
Would anybody help me...

