56 questions
0
votes
1
answer
68
views
Adding a field to form in d365 does not show the value on front end
I have to add the field 'Payment' from SalesTable to the form 'SubbillDeferralScheduleTable' in the sales order header. This should show the terms of payment of each salestable on that particular ...
1
vote
0
answers
48
views
Java Swing ignores attributes set to the specific components
I'm working on an IntelliJ plugin using Gradle and the Java Swing library. I've realized that some of the attributes I'm setting are getting ignored like the Background or the color of the Border. For ...
0
votes
0
answers
38
views
Multiple SwingWorker synchronization
I have a program that parses XML from web and then shows information in form of JTable. Information can be updated while the program is running.
This update method is called from EDT by a Timer every ...
0
votes
0
answers
24
views
Are Swing MouseMoved events dispatched in input order?
I'm developing a small game engine in Java and I use Swing to collect input and display graphics. I'm having a strange bug with MouseMoved events and I'm wondering whether the EDT handles the inputs ...
0
votes
0
answers
203
views
Java Swing paintImmediately() method works on main thread instead of EDT thread
I am writing a program, which is supposed to update and render animation for each frame. I have an AnimationPanel class which extends JPanel and an Animation class, which maintains my animation with ...
0
votes
1
answer
117
views
Is there any difference? SwingWorker#publish vs SwingUtilities#invokeLater
Let's say we have a long/heavy task that must run in background, and publish its progress or whatever to the GUI. I know that this publishing must happen on the event dispatch thread. That's why we ...
2
votes
2
answers
117
views
Make the animation faster when there are thousands of components
I am trying to hide a JSplitPane with animation. By hide, I mean to setDividerLocation(0) so its left component is invisible (technically it is visible, but with zero width):
public class ...
1
vote
1
answer
109
views
Codename One: Background threads needing access to the UI
My app has background threads that need to access the UI.
Imagine a chess program (AI) that "thinks" for a number of seconds before it plays a move on the board.
While the thread runs the UI ...
1
vote
1
answer
437
views
Performance issue displaying JFreeChart points, when running in the EDT
Background:
A well-known Swing best-practice requirement is that code that
interacts with the Swing framework must also execute in EDT (Event
Dispatch Thread).
I thus changed my code to have my ...
0
votes
1
answer
95
views
Can't update value of JProgressBar from another thread when adding another items
I have a problem with displaying current status(in JProgressBar) while adding another components to JPanel.
This operation is heavy and takes at about 2 seconds with 20 iterations (adding 20 items).
...
0
votes
1
answer
343
views
EDT and SwingWorker Thread - Publish and Process
EDT and SwingWorker concepts are kind of confusing. I have gone over the method definitions a couple of times now and wrote some sample programs as well.
Below is the current scenario I have,
1) I ...
0
votes
0
answers
126
views
Java Most efficient way of creating Button actionListener?
I am working on a project that involves GUI. On the JFrame I have several JButtons that perform specific actions when clicked. Now the problem is, with the code I wrote, every time the buttons are ...
16
votes
2
answers
16k
views
How does the scipy distance_transform_edt function work?
https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.morphology.distance_transform_edt.html
I'm having trouble understanding how the Euclidean distance transform function works ...
-4
votes
1
answer
830
views
How to read from .dat file and populate in JTable?
I need to read data from scores.dat file and pop it into a JTable, here is more info:
Scores.dat looks like
Team Name Score1 Score2
Red John 55 7
Blue Michael 33 6
Green ...
5
votes
1
answer
2k
views
Why should SwingUtils.invokeAndWait() method be called outside an EDT thread?
Edit : I have referred this link and I'm able to understand the codeflow of InvokeLater. My question is, why is this logic implemented this way? Are there any specific reasons?
Following is my code:
...
0
votes
0
answers
30
views
should all/most awt.Toolkit methods be run in the EDT?
... specifically, I'm using getSystemClipboard()... and then doing things like getting and setting content.
At the start of the API doc (Java 7) it says:
Many GUI events may be delivered to user ...
-3
votes
2
answers
3k
views
how to interprete this thread dump from a hung Java Swing application?
I have the following thread dump from a hung java swing application. It hung after a button is clicked and the GUI changed to blank. Other threads in socket communication and task management are still ...
1
vote
3
answers
611
views
Java Swing separate core with GUI
I don't understand how to separate the core of my program with the GUI part of my program. Indeed, all the examples on the web say that any GUI action must be executed with SwingUtilities.invokeLater()...
3
votes
2
answers
2k
views
In Swing can you post an event to the top of the EDT events queue?
I am looking for a way to do what the InvokeLater() function does only instead of putting the event on the bottom of the event queue it puts it on top. At least I think that will do what I want, maybe ...
2
votes
5
answers
554
views
Swing thread safety boilerplate
For the sake of simplicity, imagine an application that downloads a file. There is a simple GUI with one label that displays progress. To avoid EDT violations, like every lawful citizen I download the ...
1
vote
3
answers
798
views
Should swing event handlers be queued after the event on the EDT?
Should swing event handling code be queued after the event on the EDT? If so, is it the responsibility of the event source to schedule the event handlers, or is it the responsibility of the event ...
1
vote
0
answers
100
views
Does java.awt.Desktop need to be used on the EDT?
Looking around I couldn't find a requirement that java.awt.Desktop is required to be used on the EDT, and I couldn't think of a reason why it should be, but I couldn't find anywhere that explicitly ...
3
votes
1
answer
3k
views
Java - SwingWorker - problem in process() method
I am using javax.swing.SwingWorker for the first time.
I want to update a JLabel from the interim results published by the swing worker as follows:
publish("Published String");
Now to update the ...
1
vote
1
answer
174
views
Is it possible that EDT violations cause NullPointerException in an external software?
I have a Java software that was recently integrated into another Java software (which I will call "external" software). We use listeners and call back mechanisms for "communication" between two ...
0
votes
4
answers
603
views
TreeSet acting weird
I'm having a weird problem with TreeSet (sortedNodes) and ArrayList (nodes). In my program, I have in a method called from Event Dispatch Thread (from ActionListener) these lines:
System.out....