set the horizontal position where text will be added in JTextarea?

Hi,

Is there a way to set the horizontal position where text will be added in JTextarea?

I have:
First, Middle, Last name and then Company name.
Ex.
Jay F. Bar                                 Some Company
Ron  G.  McDonald               Some Other Company

I can't get the company names to line up using "\t" - can I set the insertion point for the company name to some line position?

Thanks
LVL 1
taborrgAsked:
Who is Participating?
 
CEHJConnect With a Mentor Commented:
Well in that case just append each line using String.format
0
 
CEHJCommented:
Save yourself a lot of hassle (you can only do what you're attempting by using an ugly monospaced font anyway) by using a JTable
0
 
taborrgAuthor Commented:
Can a JTable be added to a JScrollPane?
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
taborrgAuthor Commented:
How would that be done with a monospaced font?
0
 
CEHJCommented:
Can a JTable be added to a JScrollPane?

Yes. It almost always is actually
0
 
taborrgAuthor Commented:
How about in the JTextarea with a monospaced font?  I actually like Couriernew.
0
 
taborrgAuthor Commented:
Looks good,

Thanks
0
 
CEHJCommented:
:)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.