Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-04-2007, 05:27 PM
Senior Member
 
Join Date: Jun 2007
Posts: 130
Jack is on a distinguished road
Synchronization problems
Hi guys,
I have a problem with a program in Java and I'd like to know your opinion.

I explain to you:
I have one interface graphical (JFrame) with a button that when it is touched executes a code that realizes a set of tasks.
What I want is that, as the above mentioned code is executed, visualize information about his evolution in the graphical interface.

When I still don't have the interface, it was showing the messages across the exit (with a System.out.println) . But when I have tried to put the interface, the messages do not go out until the whole code has been executed.
My question is: how can I do that messages can be visualized in dynamic way?

thanks

Last edited by Jack : 06-04-2007 at 09:17 PM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-05-2007, 05:02 PM
Ed Ed is offline
Senior Member
 
Join Date: Jun 2007
Posts: 110
Ed is on a distinguished road
You can use threads, a thread for each task, give them low priorities, and a thread with the highest priority to the task that does the visual interface, and then put it in sleep the time that you consider necessary.
Think that with this schema the secondary threads will not execute in a sequencial order,
your tasks musn't depend on the others task, so you don't have problems of synchronization
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-02-2007, 02:17 AM
Senior Member
 
Join Date: Jun 2007
Posts: 164
Heather is on a distinguished road
as Ed says, try with threads.
If you don't know how to use it I can send you a good tutorial
just let me know
heather
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Synchronization Doesn't seem to work sherinpearl Threads and Synchronization 1 04-23-2008 07:30 PM
Thread priorities, synchronization and messaging JavaForums Java Blogs 0 12-17-2007 01:21 PM
is synchronization on method passing local variables as parameters needed reddzer Java Servlet 0 11-10-2007 05:47 PM
synchronization question oguz Threads and Synchronization 1 09-22-2007 01:34 AM
problems with JPA Ed New To Java 2 07-04-2007 06:34 AM


All times are GMT +3. The time now is 03:35 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org