Skip to main content

About JeditorPane Line Size Problem

1 reply [Last post]
Joined: 2008-04-26

Please some one tell me, I am using Jeditorpane and also try in JtextField but in both component i am facing same problem.
My problem is when i am open a file in both component ( my file is having same length for each line that means every line have same length) but when is display in jeditorpane so if there is space in any line so length display differ.

It means if space occurs in any line so when it display in jeditorpane so as compare to other line it length look like differ but length is same.

There is only length look differ but actually it same. how can i manage that

I am not able to clearly mentioned my problem but still try to help me. because i am also very confuse.

You can replay me on
Thanks in advance .

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2006-12-18

You'll need to set the [url=]used font[/url] to a [url=]monospaced[/url] family.

Monospaced fonts give each character the same width as any other, allowing you to align text. Most coding IDEs will default to a monospaced font for indenting convenience.