【问题标题】:Binding an EditorKit to a specific document model for a JTextPane将 EditorKit 绑定到 JTextPane 的特定文档模型
【发布时间】:2009-04-25 00:16:40
【问题描述】:

我似乎无法找到一种方法让编辑器工具包仅适用于一个 JTextPane。每次我实现一个时,它总是对框架中的任何 JTextPane 起作用。

我该如何解决这个问题?

【问题讨论】:

  • 如何设置/激活套件?

标签: java swing


【解决方案1】:

为什么不对您的每个窗格使用editorPane.setEditorKit(new MyKit(())

【讨论】:

  • 那行不通。我正在使用 StyledEditorKit 来制作动作,它们似乎适用于框架中的任何 JTextPane。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-07-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多