Java Swing is not thread safe; does this mean two people cannot change their specificity like JcomboBox at the same time

Hi I am relatively new to Java Swing. I'm working on an application that uses Swing related classes and methods like JComponent, JPanel, JComboBOx.

I read the docs saying Swing is not thread safe. Does this mean that if I have a JComboBox in a GUI (with / without editing capability), no one can modify the Box at the same time (or cannot access it).

Eager to understand this concept.


source to share

1 answer

This means that when the Swing component is displayed on the screen, any changes must be made in the Swing GUI thread.

See SwingUtilities.invokeLater (Runnable), SwingWorker and javax.swing.Timer



All Articles