I recently started using swing after years of using C# and I was wondering: In swing, is there a corresponding method to Control.ResumeLayout/SuspendLayout?
I’m asking because of I’m trying to fix an old UI my company is using and I want to suspend all drawing while i do operation on the components (specifically JTable) after I finish with all the logical work only then do I want the controls (or in this case the JComponents) to draw themselves.
The components are contained within a JFrame. Unfortunetly at the this stage refactoring the code isn’t really an option, so any help would be very very very very welcomed.
Thanks
If you do work on the eventdispatch thread (which for long operations is not a good idea as it will lock your GUI) this will block repaints. I do not understand why you would want this, when you could just have the old JTable up while the new one is populated. Once you have created the JTable, you would then add it on the event dispatch thread which would cause a repaint.