In Swing, the GUI should only be updated with EDT, as the GUI components are not thread safe.
My question is that if I have one thread other than EDT that is designed to update a specific component, and this component does not have access to any other thread in my program, only this dedicated thread, is this normal? In my case, I have a JTable , and the stream receives information from the network and updates the table (without using EventQueue.invokeLater ). All other components are updated with EDT. I have not seen the problem yet, and I was wondering if the error would eventually appear.
UPDATE My goal was to update the table in real time. The data is constantly coming from the network, and for this I selected 1 stream only for the table, in order to update it as they appear. If I use SwingUtilities.invokeLater, this means that the table will be updated when EDT is available. Isn't swing supposed for real-time update requirements?
source share