- Field dispatchThread;
-
- AWTThread() {
- dispatchThread = getDispatchThreadField();
- }
-
- private Field getDispatchThreadField()
- {
- try {
- Field f = EventQueue.class.getDeclaredField("dispatchThread");
- f.setAccessible(true);
- return f;
- } catch (SecurityException e) {
- throw new RuntimeException(e);
- } catch (NoSuchFieldException e) {
- throw new RuntimeException(e);
- }
- }
-