eventqueue

Bloomberg API request timing out

Having set up a ReferenceDataRequest I send it along to an EventQueue Service refdata = _session.GetService("//blp/refdata"); Request request = refdata.CreateRequest("ReferenceDataRequest"); /* append the appropriate symbol and field data to the request */ EventQueue eventQueue = new EventQueue(); Guid guid = Guid.NewGuid(); Correlati...

Waiting for invokeLater() to be called

Is there a more elegant way to do what I'm doing below? That is, is there a more elegant way than polling and sleeping, polling and sleeping, and so on to know when a Runnable.run() method has been called via invokeLater()? private int myMethod() { final WaitForEventQueue waitForQueue = new WaitForEventQueue(); EventQueue.invok...

Why do people run Java GUI's on the Event Queue

In Java, to create and show a new JFrame, I simply do this: public static void main(String[] args) { new MyCustomFrameClass().setVisible(true); } However, I have seen many people doing it like this: public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { ne...

How to replace the AWT EventQueue with own implementation

In order to debug strange behavior in a Swing-application I'd like to replace the AWT EventQueue with my own implementation. Is this possible? How? Just in case you are interested: the implementation will be a simple wrapper around the normal Eventqueue, doing some logging. the problem I'd like to debug is a TableCellEditor, which wo...

Is update from EDT in swing an absolute rule or are there exceptions?

In Swing, the GUI is supposed to be updated by the EDT only, since the GUI components are not thread safe. My question is, if I have a single thread, other than the EDT, that is dedicated to update a specific component, and this component is not accessed by any other thread in my program, only this dedicated thread, is it ok? In my case...