VB refugee seeks equivalent to application.doevents() [message #799644] |
Thu, 16 February 2012 06:00 |
David Straayer Messages: 3 Registered: February 2012 |
Junior Member |
|
|
Hello,
I've been working in Java for a couple of years now, and did a lot of hacking in VB in days of yore. Delighted to see Windows Builder bring similar ease of development for GUI applications.
Here is my problem: I got a simple WB application up and running, but the screen isn't fully built when my program is off reading and parsing files. I want it to display its window and update JLabels on it as it runs, without ever the user interacting with it. In VB, I'd just call application.doevents() any time I want to ensure that all events have been processed and the window is fully updated.
Basically, when I start my application, I want it to display its window, and update JLabels on its window as it uses java.util.prefs.Preferences and interacts with files, without any user interaction except for the program launch.
If this isn't clear enough (I'm hoping fellow VB refugees have faced and dealt with this issue), perhaps I can explain more tomorrow.
Any help would be appreciated.
Dave Straayer
|
|
|
|
Re: VB refugee seeks equivalent to application.doevents() [message #800372 is a reply to message #799644] |
Fri, 17 February 2012 01:41 |
Eric Clayberg Messages: 979 Registered: July 2009 Location: Boston, MA |
Senior Member |
|
|
David Straayer wrote on Thu, 16 February 2012 01:00I've been working in Java for a couple of years now, and did a lot of hacking in VB in days of yore. Delighted to see Windows Builder bring similar ease of development for GUI applications.
BTW, WB itself also dates back to the days of yore. The original version of WB (for Smalltalk) actually predates the release of Visual Basic back in the very early '90's!
David Straayer wrote on Thu, 16 February 2012 01:00Basically, when I start my application, I want it to display its window, and update JLabels on its window as it uses java.util.prefs.Preferences and interacts with files, without any user interaction except for the program launch.
If you are using Eclipse SWT, look at the use of Display.syncExec() and asyncExec() as Konstantin suggests. If you are using Swing (you mentioned JLabels, so I am guessing that might be the case), I don't know. In general, however, this is not the best forum to ask general Java UI usage questions. The Eclipse SWT or general Java Swing forums would be better places for questions like that.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03693 seconds