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 09-17-2008, 12:42 PM
Member
 
Join Date: Sep 2008
Posts: 3
neha_negi is on a distinguished road
Inside a Timer thread loop,how to refresh a JTable in swing
Hello everybody,
I am using a timer thread loop and inside that loop i am featching the data from a datagrampacket,and update a JTable by using

table.setValueAt(value,row ,column);

and after that, by using repaint() method refreash the JTable.But the values are not view on the JTable .
But when print the table data inside the thread loop ,

System.out.println(table.getValueAt(rownum,0));

that value of the table(row,col) print in console.

Please help me to repaint the JTable inside a timer thread loop.

Thanks

Last edited by neha_negi : 09-17-2008 at 03:46 PM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 09-17-2008, 06:57 PM
Nicholas Jordan's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Southwest
Posts: 789
Nicholas Jordan is on a distinguished road
not a threading issue
Then it is a GUI issue. Yes, it sounds like threads but repaint probably should be update and so on. The have a boilerplate in Swing using invokeLater that works correctly, digging through repaint is unproductive.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 09-18-2008, 11:14 AM
Member
 
Join Date: Sep 2008
Posts: 3
neha_negi is on a distinguished road
Thanks sir......
I will use Swingutilities.invokeLater.
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
Once again: waiting in a thread loop. willemjav Threads and Synchronization 115 09-22-2008 03:35 PM
Swing problem: JTable/TableModel Levish2002 AWT / Swing 2 08-24-2008 10:53 PM
how to refresh data of the JTable paty Database 3 08-17-2008 02:01 PM
Does anyone know how this Swing Object is called ? Image inside hannehomuth Advanced Java 1 07-26-2008 07:26 PM
freezing when use socket.accept() inside of a thread tamayo Advanced Java 0 07-24-2007 01:48 AM


All times are GMT +3. The time now is 08:05 PM.


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