2016-01-08 38 views
0

如何更改JTextPane的EditorKit?我想改变它,因为我发现了一个更好的方式来设置标签大小......但这需要我设置它。我不想将其更改为EditorPane,因为我的代码是为使用其中的样式功能而构建的。更改JTextPane EditorKit

+0

使用'setEditorKit(...)'??? – camickr

+0

@camickr我的Eclipse只是用最后一个方法窃听,它是 – ThePrimedTNT

回答

1

我的Eclipse只是用它

“最终”意味着你不能“扩展”的方法,在“最后”的方法窃听。

这并不意味着你不能 “援引” 的方法:

EditorKit editorKit = new SomeBetterEditorKit(); 
JTextPane textPane = new JTextPane(); 
textPane.setEditorKit(editorKit); 
相关问题