Solved

JEditorPane TAB JDK 1.2.2

Posted on 2000-03-23
3
338 Views
Last Modified: 2008-02-20
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.
0
Comment
Question by:cmain
  • 2
3 Comments
 
LVL 2

Expert Comment

by:mwibbels
ID: 2648819
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
 
LVL 1

Author Comment

by:cmain
ID: 2649017
Got it thanks.
if (wantPoints())
  answer();

0
 
LVL 2

Accepted Solution

by:
mwibbels earned 100 total points
ID: 2649110
answer();
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now