JEditorPane TAB JDK 1.2.2

How do I change the default width of a tab stop in a JEditorPane in JDK1.2.2

The default seems to be 8, I want 2 or 4.

Thanks.
LVL 1
cmainAsked:
Who is Participating?
 
mwibbelsConnect With a Mentor Commented:
answer();
0
 
mwibbelsCommented:
If you're using PlainDocument for the document model (if you're not sure call getDocument() on the JEditorPane and see what you get) there is an attribute called 'tabSizeAttribute', if you set that on your document you can set the tab size.

See the documentedtion for javax.swing.text.PlainDocument
0
 
cmainAuthor Commented:
Got it thanks.
if (wantPoints())
  answer();

0
All Courses

From novice to tech pro — start learning today.