Answer the question
In order to leave comments, you need to log in
How to solve the problem with "AWT-EventQueue-0" java.lang.NullPointerException?
ActionListener listen = new ActionListener() {
public void actionPerformed(ActionEvent e) {
for (int i = 0; i < fi.bo.length; i++) {
if (fi.bo[i] == fi.obe.length) {
fi.shi = fi.shi + 1;
}
}
}
};
Answer the question
In order to leave comments, you need to log in
1) The code must be enclosed in the "code" tag - then it will be readable
2_ Most likely you have fi or bo == null. We are connected by a debugger and we look.
Class EventQueue
In the same order as they are enqueued.
That is, if AWTEvent A is enqueued to the EventQueue before AWTEvent B then event B will not be dispatched before event A.
https://docs.oracle.com/javase/7/docs/api/java/awt...
try {
EventQueue.invokeAndWait(new Runnable() {
@Override
public void run() {
new TApplication();
System.out.println("invokeAndWait");
}
});
} catch (InterruptedException e) {
e.printStackTrace();
} catch (Exception e) {
Throwable cause = e.getCause();
if (cause instanceof RuntimeException) {
throw (RuntimeException) cause;
} else {
cause.printStackTrace();
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question