Results 1 to 3 of 3
Thread: Synchronization problems
- 06-04-2007, 04:27 PM #1
Senior Member
- Join Date
- Jun 2007
- Posts
- 130
- Rep Power
- 0
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?
thanksLast edited by Jack; 06-04-2007 at 08:17 PM.
- 06-05-2007, 04:02 PM #2
Senior Member
- Join Date
- Jun 2007
- Posts
- 110
- Rep Power
- 0
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
- 07-02-2007, 01:17 AM #3
Senior Member
- Join Date
- Jun 2007
- Posts
- 164
- Rep Power
- 7
Similar Threads
-
synchronization question
By oguz in forum Threads and SynchronizationReplies: 2Last Post: 07-22-2008, 08:56 AM -
Synchronization Doesn't seem to work
By sherinpearl in forum Threads and SynchronizationReplies: 1Last Post: 04-23-2008, 06:30 PM -
is synchronization on method passing local variables as parameters needed
By reddzer in forum Java ServletReplies: 0Last Post: 11-10-2007, 04:47 PM -
problems with JPA
By Ed in forum New To JavaReplies: 2Last Post: 07-04-2007, 05:34 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks