Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2012-03-14
8
Medium Priority
?
232 Views
Last Modified: 2012-06-27
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
0
Comment
Question by:taborrg
[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
  • 4
  • 4
8 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 37719216
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
 
LVL 1

Author Comment

by:taborrg
ID: 37719232
Can a JTable be added to a JScrollPane?
0
 
LVL 1

Author Comment

by:taborrg
ID: 37719264
How would that be done with a monospaced font?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 86

Expert Comment

by:CEHJ
ID: 37719273
Can a JTable be added to a JScrollPane?

Yes. It almost always is actually
0
 
LVL 1

Author Comment

by:taborrg
ID: 37719294
How about in the JTextarea with a monospaced font?  I actually like Couriernew.
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 2000 total points
ID: 37719322
Well in that case just append each line using String.format
0
 
LVL 1

Author Closing Comment

by:taborrg
ID: 37719328
Looks good,

Thanks
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 37719330
:)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
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.
Suggested Courses

618 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