且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

哪种Swing组件方法是线程安全的?

更新时间:2023-01-13 18:02:05

谷歌教我至少那些是线程安全的。以下是链接再次破坏的情况概述:

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()

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

      • JTextArea


        • insert()

        • append()

        • replaceRange()

        • JTextArea
          • insert()
          • append()
          • replaceRange()

          • JTextComponent


            • replaceSelection()

            • setText()

            • print()

            • getPrintable()

            • JTextComponent
              • replaceSelection()
              • setText()
              • print()
              • getPrintable()

              • UndoManager


                • 所有方法。


                • DefaultStyledDocument


                  • insert()

                  • setLogicalStyle()

                  • setCharacterAttributes()

                  • setParagraphAttributes()

                  • DefaultStyledDocument
                    • insert()
                    • setLogicalStyle()
                    • setCharacterAttributes()
                    • setParagraphAttributes()

                    • StyleContext


                      • addAttribute()

                      • addAttributes()

                      • removeAttribute()

                      • removeAttributes()

                      • reclaim()

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

                        • AbstractDocument


                          • render()

                          • remove()

                          • insertString()

                          • createPosition()

                          • AbstractDocument
                            • render()
                            • remove()
                            • insertString()
                            • createPosition()