Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
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 07-24-2007, 01:50 PM
Member
 
Join Date: Jul 2007
Posts: 13
musiigedeo is on a distinguished road
swingworker
Hey Guys
Am sending data to the serial port a byte at a time and a response is recieved at the serialport for every sent byte.

My problem is that all the responses are displayed in the application after all the bytes are sent. I want each response to be shown in the application when it's recieved and not after all the bytes are sent. I am trying to use the swingworker to manage my threads, but I just cannot get it to work. Plze give me a hand

NB. I have attached the class ttteer which runs the GUI and the class SimpleRead.java which has the method "serialEvent(SerialPortEvent event)" that reads from the serial port when ever there is an event and the method writeToport() that writes to the port.
Attached Files
File Type: txt ttteer.txt (4.3 KB, 0 views)
File Type: txt SimpleRead.txt (4.8 KB, 0 views)
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-26-2007, 02:59 PM
Member
 
Join Date: Jul 2007
Posts: 13
musiigedeo is on a distinguished road
SwingUtilities.invokeAndWait
I have modifeid the attached code to use SwingUtilities.invokeAndWait to update the GUI whenever data is detected on the serial port. But It just does't work... what am I doing wrong guys?
Attached Files
File Type: txt SimpleRead.txt (6.0 KB, 0 views)
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



All times are GMT +3. The time now is 02:37 PM.


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