Blocking all components during loading content

Hi everyone.
I have small problem with my application, I get data from DB and it takes about 5-7 seconds, but during this data loading user still can use navigation menu and click same link, with is loading, it is possible to block or make disabled some components, that user do not have any chance to click link in navigation menu until content is loaded.

PS. May be it is possible to make some kind of modal window, with process indicator inside and remove it when all data loaded.

Thank for your advise.

You could run the heavy DB query in another thread. Just initialize the UI with some things disabled and start the thread. Use ProgressBar with polling with perhaps 1 s intervals. When the query is done, enable the disabled UI.

It should be very similar to
this example
. It’s also
in the Book
.

Thanks for your answer. I add WorkThread and inside run method initialize component(table and table menu) and after simple add this component to grid layout.:grin: