I’m using an event scrip to update a table from opc tags, with browse. The browse and read takes a few seconds, in that time the table is out of date. I tried to fill the table with an empty header and data, and I’ve tried covering it with a label.
You can move long running tasks you want to do to an asynchronous thread, using system.util.invokeAsynchronous.
Note the caution at the top of the manual, which I'll repeat here:
Caution
This function should not be used to asynchronously interacts with the GUI in Vision. This means interacting with window navigation, setting and getting component properties, showing error/message popups, and really any other methods that can interact with components and windows. If you need to do something with the GUI in Vision with this function, this must be achieved through a subsequent call to system.util.invokeLater.
Your event script runs in the foreground, and Java Swing is single threaded for all component updates. Which means your attempts to hide or alter a component will not be drawn until you give up the CPU (finish your event script).
Little clean up note on your script - you never need to import system and you never should import your own library scripts - it can cause caching issues.
It sounds like you have a browse button that they click and then it updates the table? You could have the browse button first have an event to enable the visibility of a loading message then at the end of your script revert said visibility setting. One option for a work around rather than doing it mid script.