Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » VB refugee seeks equivalent to application.doevents()(Having trouble getting everything updated.)
VB refugee seeks equivalent to application.doevents() [message #799644] Thu, 16 February 2012 06:00 Go to next message
David Straayer is currently offline David StraayerFriend
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 #799956 is a reply to message #799644] Thu, 16 February 2012 14:02 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin ScheglovFriend
Messages: 555
Registered: July 2009
Senior Member
Read about Display.syncExec() and asyncExec().
http://www.javalobby.org/java/forums/t43753.html
http://book.javanb.com/swt-the-standard-widget-toolkit/ch05lev1sec7.html


Konstantin Scheglov,
Google, Inc.
Re: VB refugee seeks equivalent to application.doevents() [message #800372 is a reply to message #799644] Fri, 17 February 2012 01:41 Go to previous messageGo to next message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 979
Registered: July 2009
Location: Boston, MA
Senior Member
David Straayer wrote on Thu, 16 February 2012 01:00
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.

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:00
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 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.
Re: VB refugee seeks equivalent to application.doevents() [message #861587 is a reply to message #800372] Sat, 28 April 2012 16:45 Go to previous message
Hans Mueller is currently offline Hans MuellerFriend
Messages: 28
Registered: April 2012
Junior Member
very good
Previous Topic:2 performance problems with wb.
Next Topic:Customizer window size
Goto Forum:
  


Current Time: Thu Apr 25 14:02:42 GMT 2024

Powered by FUDForum. Page generated in 0.03446 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top