event-dispatch-thread
Swing verify code on Event Dispatch Thread at runtime
Are there any libraries that instrument code to verify that methods called on Swing components are called on the Event Dispatch Thread? It probably wouldn\'t be too difficult to write some basic code[详细]
2023-01-03 13:00 分类:问答Does the EDT restart or not when an exception is thrown?
(the example code below is self-contained and runnable, you can try it, it won\'t crash your system :)[详细]
2023-01-02 22:04 分类:问答Check if thread is EDT is necessary?
I have an UI implemented with Swing. One component does some work that may take some time, so I use SwingUtilities.invokeLater. However, I was reading some old code and found this in an ActionListener[详细]
2022-12-27 12:09 分类:问答Trouble getting Swing to refresh JLabel (apparently on event dispatch thread)
I have this action listener: this.newGameButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent a) {[详细]
2022-12-27 08:50 分类:问答Handling the Event Dispatch Thread
I have a question about the \'Event Dispatch Thread\'. I have a Main class that is also a JFrame. It initialises the rest of the components in the code, some of them do not involve Swing and some of t[详细]
2022-12-25 07:43 分类:问答Make thread run on non EDT (event dispatch thread) thread from EDT
I have a method running on the EDT and within that I want to make it execute something on a new (non EDT) thread. My current code is follows:[详细]
2022-12-22 15:44 分类:问答Returning values from Swing using invokeAndWait
I\'ve been using the following approach to create components and return values from Swing t开发者_开发问答o/from outside the EDT. For instance, the following method could be an extension to JFrame, to[详细]
2022-12-22 10:31 分类:问答Java: is there a SwingUtilities.invokeNowOrLaterIfEDT(...) or similar?
(be sure to read the edit below, this question is obviously confusing I\'m sorry about that) Here\'s a typical SwingUtilities.invokeLater call:[详细]
2022-12-19 21:06 分类:问答Is it possible to perform active rendering in Java Swing without being on the EDT?
I am looking into using Buffer Strategy and th开发者_运维技巧e following technique described on the Javadoc:[详细]
2022-12-14 18:21 分类:问答Getting the value from a Swing component from outside the EDT
My current code looks like this: final String[] value = new String[1]; Swing开发者_C百科Utilities.invokeAndWait(new Runnable() {[详细]
2022-12-11 07:17 分类:问答