Font size of TextArea
How can we set the character width of every character entered in a TextArea to be the same. I mean the width of a 'w' is the same as that of an 'i' .. Thanks in advance.
[187 byte] By [
rousava] at [2007-9-30 2:26:10]

use a fixed width font, e.g. monospaced, courier new, lucida sans typewriter..JTextArea jta = new JTextArea("abcdef");
jta.setFont(new Font("Lucida Sans Typewriter", Font.PLAIN, 12));
hi Rousav,I have one question. What is the benefit from setting the same distance among words, eg. letter 'i' and 'w'?Was it good as we see that the letter don't link together, like the word 'w i sdom'?Vinh Tu Nguyen
Monospaced fonts are useful if you are displaying tabular data in a text field, for instance, whrer using a proportional font would screw up the formatting.
Also, constantly changing data (such as time) is often better displayed with a monospaced font, otherwise the position of each character will vary with time, which is not easy on the eye.
Basically, my code revolves around the alignment of lines of code and to be consistent I wanted to have each character of the same width. Also, the letters dont look as bad.