Content deleted Content added
m Robot - Speedily moving category Java programming language to Category:Java (programming language) per CFDS. |
Repairing links to disambiguation pages - You can help! |
||
Line 40:
=== Requests from other threads ===
Other application threads can pass some code to be executed in the event dispatching thread by means of {{Javadoc:SE|javax/swing|SwingUtilities}} helper classes (or {{Javadoc:SE|java/awt|EventQueue}} if you are doing [[Abstract Window Toolkit|AWT]]). The submitted code must be wrapped with a {{Javadoc:SE|java/lang|Runnable}} object. Two methods of these classes allow:
* synchronous code execution ({{Javadoc:SE|member=invokeAndWait(Runnable)|javax/swing|SwingUtilities|invokeAndWait(java.lang.Runnable)}} or {{Javadoc:SE|member=invokeAndWait(Runnable)|java/awt|EventQueue|invokeAndWait(java.lang.Runnable)}})
* and asynchronous code execution ({{Javadoc:SE|member=invokeLater(Runnable)|javax/swing|SwingUtilities|invokeLater(java.lang.Runnable)}} or {{Javadoc:SE|member=invokeLater(Runnable)|java/awt|EventQueue|invokeLater(java.lang.Runnable)}})
|