addActionListener disables communication

......

incarca.inc.addActionListener(this);

pack();

setLocationRelativeTo(frame);

setVisible(true);

}

publicvoid actionPerformed(ActionEvent e){

if("Incarca" == e.getActionCommand()){

System.err.println("Button Pressed");

incarca.getNumbers();

}

incarca is a JFrame and inc is a button on that Frame. an instance of incarca is previously loaded in this applet. When I press the button the function actionPerformed records it put when the compiler reaches incarca.getNumbers() it throes the following errors "java.lang.NullPointerException" and "java.security.AccessController.doPrivileged(Native Method)". After the button is pressed i can't acces anything inside incarca class. Is there something that can be done?

[1118 byte] By [cristianregepa] at [2007-11-26 14:14:12]
# 1
Post a Short, Self Contained, Compilable and Executable, Example Program (SSCCE) that demonstrates the problem.
Rodney_McKaya at 2007-7-8 2:03:32 > top of Java-index,Security,Event Handling...