Only 44 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Is it feasible to use Jtable for displaying Streaming Content?  RSS feed

 
Preeethi Jainnn
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a requirement where i need to display Streaming Data like Bid , Ask , Last , Change values for the Stock Quote Symbols recievied from a third party server in a Grid .

For this can i use a Jtable as the Data would be chnaging continously ??

Please share your views , thanks in advance

 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can, but you need to take into account Concurrency in Swing. In other words, reading the stream should be done in a background thread and the updates on the Event Dispatcher Thread. A SwingWorker could help out here, with doInBackground doing the hard work, calling publish as needed. You can then override process to insert data into the table.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!