Solved

JEditorPane TAB JDK 1.2.2

Posted on 2000-03-23
3
344 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

617 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