How do you set the tab size in a JEditorPane?

前端 未结 3 2045
后悔当初
后悔当初 2020-12-16 19:17

A JTextArea\'s tab size can easily be set using setTabSize(int).

Is there a similar way to do it with a JEditorPane?

R

3条回答
  •  温柔的废话
    2020-12-16 19:42

    Took me a while to figure this out. And decided to use TabStop's in a TabSet that have calculated width based on the font size. This has to be reset when ever the font size changes (in the paint() method of the JEditPane).

    Complicated stuff! :(

提交回复
热议问题