Questions tagged [awt-eventqueue]
68 questions
0
votes
2 answers
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: -1 error
So I'm having trouble with an application I've been working on and I only saw one other post with the -1 error and doesn't seem to help me with what is going on. We have an items tab that when you click on a consignor, it should display the items…

Sheddy
- 119
- 1
- 7
0
votes
2 answers
Read Textfile to jTable
I'm tryin' to import some data from a textfile to my JTable..
I wrote some code to do this:
JMenuItem Open = new JMenuItem("Open gegevens");
Open.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
…

VanpeltJ
- 21
- 7
0
votes
0 answers
AWT-EventQueue-0 Error, cannot call method from mouse click
I'm getting an error when trying to use a method from within another class when the mouse clicks a button. I can call this method from anywhere else fine just when called from here it gives me this error:
Exception in thread "AWT-EventQueue-0"…

user202051
- 173
- 2
- 5
- 17
0
votes
2 answers
AWT-EventQueue-0 NullPointerException
I'm pretty new to Java, and I'm trying to populate my JList with data from a database. The data is retrieved from the database via the method visKunder() in the Database class.
public ArrayList visKunder(){
String s1 = "select kundenavn,…
user3514879
0
votes
1 answer
How to handle "AWT-EventQueue-0" java.lang.NullPointerException?
I am trying to delete a data from JTable and also from text file but got "AWT-EventQueue-0" java.lang.NullPointerException. Please help me, here is my code:
private void btndeleteActionPerformed(java.awt.event.ActionEvent evt2){
deleteRow(); …

mayuresh
- 7
- 2
0
votes
1 answer
"AWT-EventQueue-0" error on a game trial code
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at Snooker.paint(Snooker.java:34)
this is error what I've got.
Here is the code:
Main Class:
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Graphics;…

A.D
- 7
- 5
0
votes
1 answer
"AWT-EventQueue-0" java.lang.NullPointerException in java
I'm coding a program for a pizza restaurant and the code must calculate the total price
according to what the customer wants on his pizza.
Code
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.JOptionPane;
import…

fatima.own93
- 3
- 1
0
votes
1 answer
Slow work of EventQueue
I have a simple JAVA program with gui that just increments int variable and displays its value in JLabel.
I create new thread for proper(thread-safe) updating JLabel by calling inside it EventQueue.invokeLater() with Runnable class which run method…

Artem Novikov
- 4,087
- 1
- 27
- 33
0
votes
2 answers
Java: Exception in thread "AWT-EventQueue-0" java.util.ConcurrentModificationException
i am currently trying to code my own little 2D Game. It's a Helicopter dodging rockets.
these rockets flighing from right to the left. If they are outside of the Panel they should be deleted.
this is how it looks like:
private void doLogic() {
…

user2814223
- 13
- 4
0
votes
1 answer
Trying to read from a text file in java getting error: Exception in thread "AWT-EventQueue-0" java.util.NoSuchElementException
Im getting an error and i have no idea where it is coming from?
Heres where i think the problem lies:
public boolean verifyLogin(String username, String password)
{
//method to check if the Login details math those in the text file
…

user2654207
- 11
0
votes
3 answers
Java: how to use JTableModel in eventQueue
I have a class extending AbstractTableModel and it pools Data from a Database, Since its a Swing Component I initialize it in EventQueue, the Problem is most of the operation such as getting Connection and Querying DB all runs in eventqueue hence it…

Alfa
- 599
- 6
- 22
0
votes
0 answers
Update Thread in applet
In my application i have created multiple Threads, In that in each thread value has been changed. so every minute i want update all threads the same value from the list..In this coding, values are not updated. previous values only retained in every…

kanna
- 469
- 2
- 6
- 10
0
votes
2 answers
java exception in thread "AWT-EventQueue-0"
I have recently installed JDK 1.6 update 43 on my machine .Since then, whenever I try to run the event handling programs, I encounter a problem, which says Exception in thread "AWT-EventQueue-0"
Which thread does it points to?
0
votes
1 answer
Can't filter MouseEvent.MOUSE_CLICKED in AWT EventQueue
I need in my own AWT EventQueue filtering mouse double clicks, so I do:
public class AppEventQueue extends EventQueue
{
@Override
protected void dispatchEvent(AWTEvent event)
{
super.dispatchEvent(event);
if(event instanceof MouseEvent)
…

1ac0
- 2,875
- 3
- 33
- 47
0
votes
2 answers
Can anyone help me identify the Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException on Line 65?
I keep getting a Run Time error that says I am having an Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException it is saying a [line 65] but to me it just looks like a basic if statement. I can give some background. this frame is call…

user1469139
- 13
- 1
- 9