Link to home
Start Free TrialLog in
Avatar of cmain
cmain

asked on

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.
Avatar of mwibbels
mwibbels

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
Avatar of cmain

ASKER

Got it thanks.
if (wantPoints())
  answer();

ASKER CERTIFIED SOLUTION
Avatar of mwibbels
mwibbels

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial