Questions tagged [awt-eventqueue]
68 questions
1
vote
2 answers
Stopping another thread from an Event Dispatch Thread (EventQueue)
I have a login form that extends JDialog, the user can login via card swipe or by typing in a username and password.
I created a Runnable daemon that communicates to a magnetic stripe reader, when started it will request a card swipe and it will…

ELM
- 529
- 2
- 7
- 19
1
vote
0 answers
JTextField NullPointerException when registered in a separate function
I've tried to create a function that will allow me to create a set of JPanel objects in a single swoop. However, when I try to process the data created by the user's input to the field, I get a NullPointerException. If I create the label/field and…

nloah
- 11
- 4
1
vote
3 answers
How to replace or restart a deadlocked Swing EventDispatchThread/EventQueue in Java 8 desktop application
A while back we added some code to our application to detect and attempt to recover from a Swing EDT deadlock, so the user could at least save their files (it would be best to not have a deadlock, but...). In Java 1.6, this is easy. Detect that…

Benjamin Horstman
- 743
- 7
- 12
1
vote
1 answer
Error in Java Program: "Move initializer to constructor"
Where it starts java.awt and public void run(), they are both underlined in red and when I click on them with my mouse, I get a message that says to move initializer to constructor. Can anyone help me with this?
public static void main (String[]…

Alicia Hock
- 11
- 2
1
vote
1 answer
how events are dispatched from event queue
I read a statement in Java docs related to event queue saying that "note that events being posted to the eventQueue can be coalesced" . What is the meaning of this line?

user2594479
- 83
- 5
1
vote
1 answer
NullPointerException with BufferedImage Array
I am trying to take an image and turn it into tiles that are laid out in GridLayout, but receive a runtime error.
Here is the code:
public class TileList extends JPanel {
private static final int width = 16; //width of a tile
private…

Emily
- 111
- 1
- 1
- 8
0
votes
2 answers
Why does my program give an error when reading from file?
I seem to be encountering an error when reading from a text file. This program should read a line, check the first Character, and run the related code in the if statement. The program runs fine for the first line, and outputs the contents, however…

WazZ
- 23
- 1
- 3
0
votes
2 answers
Java Swing and Event errors?
I have been running a game server and I get this error. I'm not really familiar with java yet so please help me out.
I have a couple event managers to handle player events, like woodcutting or mining, and maybe events are not stopped correctly, i'm…

Aleksandr
- 29
- 6
0
votes
1 answer
Unable to solve Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
I am currently creating a payroll software and the RemoveEmployee class does not function due to an error. I tried working my way backwards to resolve the issue but I was unable to due to my lack of experience in java.
package Assigment;
import…

SpeedyB0y
- 1
- 1
0
votes
1 answer
Event errors, not sure what they mean
I'm currently getting these errors, I've tried doing a few things to see if that would help. I even used the debugger to find out why these errors are occurring, but i'm still not sure.
If anyone would be able to help it would be really…

Molly Deakin
- 9
- 3
0
votes
1 answer
can't set undecorated for JDialog created by JOptionPane.createDialog
I have JDiolog created from JOptionPane
var pane = new JOptionPane(e.getMessage(),JOptionPane.ERROR_MESSAGE,JOptionPane.DEFAULT_OPTION);
var dialog = pane.createDialog("Error");
dialog.setUndecorated(true);
…
user10146018
0
votes
2 answers
Cannot excute jar correctly - Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError
I executed my file.jar in my terminal and it show for me this message
java -jar demoBioMini.jar
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/suprema/BioMiniSDK
And this is the full error for my problem
Exception in…

Mohamed Ali Lassoued
- 301
- 4
- 22
0
votes
0 answers
Why code never ends which contains EventQueue.invokeLater?
I have a main class : MyMainSDK
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
MyMainSDK frame = new MyMainSDK();
…

CompEng
- 7,161
- 16
- 68
- 122
0
votes
1 answer
Java error in my code Exception in thread "AWT-EventQueue-0"
I am building a Student Manager and learned everything from YouTube. Now I am stuck in this. The code is given below and the error is given below too.
This is code:
public class RegisterStart extends JFrame {
private JPanel contentPane;
private…

Rajat Patil
- 1
- 1
- 4
0
votes
1 answer
JTable swing exception
this is a follow up to a question I asked about a day ago, I have been trying to debug the code with no success, but basically the application is supposed to allow the user to select the CSV they want to import or view, after selecting the file they…

Fortune Dludla
- 55
- 7