Which Swing component methods are thread safe?

Google taught me that at least those are threadsafe. Here’s an overview for the case that the link get broken again:


  • JTextPane
    • replaceSelection()
    • insertComponent()
    • insertIcon()
    • setLogicalStyle()
    • setCharacterAttributes()
    • setParagraphAttributes()





  • StyleContext
    • addAttribute()
    • addAttributes()
    • removeAttribute()
    • removeAttributes()
    • reclaim()



Leave a Comment