Results 1 to 4 of 4
- 09-17-2008, 10:42 AM #1
Member
- Join Date
- Sep 2008
- Posts
- 3
- Rep Power
- 0
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.
ThanksLast edited by neha_negi; 09-17-2008 at 01:46 PM.
- 09-17-2008, 04:57 PM #2
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.
Introduction to Programming Using Java.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor
- 09-18-2008, 09:14 AM #3
Member
- Join Date
- Sep 2008
- Posts
- 3
- Rep Power
- 0
Thanks sir......
I will use Swingutilities.invokeLater.
-
Similar Threads
-
Once again: waiting in a thread loop.
By willemjav in forum Threads and SynchronizationReplies: 115Last Post: 09-22-2008, 01:35 PM -
Swing problem: JTable/TableModel
By Levish2002 in forum AWT / SwingReplies: 2Last Post: 08-24-2008, 08:53 PM -
how to refresh data of the JTable
By paty in forum JDBCReplies: 3Last Post: 08-17-2008, 12:01 PM -
Does anyone know how this Swing Object is called ? Image inside
By hannehomuth in forum Advanced JavaReplies: 1Last Post: 07-26-2008, 05:26 PM -
freezing when use socket.accept() inside of a thread
By tamayo in forum Advanced JavaReplies: 0Last Post: 07-23-2007, 11:48 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks