Solved

How to refresh table in Java SWT?

Posted on 2013-11-21
1
1,202 Views
Last Modified: 2013-11-27
Hi,
I ma working on creating a GUI in Java SWT and in this GUI I have a table that I update as I get data from the work thread.

The GUI has a feature to stop the process. It works fine and it can stop the processes. However, sometimes the data is already generated but since I stop the process it does not show the last one until I do some action on the table such as filtering and unfiltering again.

Is there a way to refresh the table after I stop running the processes?

Thanks,
0
Comment
Question by:Tolgar
1 Comment
 
LVL 35

Accepted Solution

by:
mccarl earned 500 total points
ID: 39668073
At the end of the normal GUI updating code, you have a table.setRedraw(true); call to turn back on the drawing of the table. Since when you cancel the processes, that part of the code probably doesn't get to run, can you add that call to your "process cancelling" code aswell, so that it get re-enabled for that code path aswell as the "normal" code path?
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now