List to textfield

Same type of question

ThreedTrans = (List) currentProject.getThreedTranslatorOptionIds();

cur3dTrans.setText(??);
jkteaterAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
You can't expect everyone to be following your every move here ;) More info please (or at least a link). Even i can't remember and i probably answered it ;)
for_yanCommented:
Do you meant to have all em,lemets in there?

String s = "";
for(int j=0; j<ThreedTrans.size();j++){

s += (String) ThreedTrans.get(j) + ",";
}

cur3dTrans.setText(s); 

Open in new window

jkteaterAuthor Commented:
Shoot I thought you guys where following my every thought pattern and question :)
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

CEHJCommented:
If it's a java.util.List subclass:
cur3dTrans.setText(ThreedTrans.toString());

Open in new window

jkteaterAuthor Commented:
ThreedTrans = (List) currentProject.getThreedTranslatorOptionIds();

the above is getting a List of values.  In my dialog I have a panel with the following

3d Translator:   [text field (cur3dTrans)]  [button]

I need to display the values of the list in my textfield.  You may say don't use a textfield, but I need for the users to be able to cut from the field
CEHJCommented:
>>If it's a java.util.List subclass:

Is it?
jkteaterAuthor Commented:
Why is it when it displays it puts brackets around the values

[DWG, IGES]
instead of

DWG, IGES
jkteaterAuthor Commented:
it is actually a ArrayList so I do have java.util.ArrayList
for_yanCommented:
Taht's how list.toString() works - with baracklets
Either use something like my code above - or strip away fiorst
and last charcater from toString()
for_yanCommented:

It does not matter - toString() for Lits or ArrayList works the same
CEHJCommented:
If you're lazy (i am)
cur3dTrans.setText(ThreedTrans.toString().replaceAll("^\\[|\\]$", ""));

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CEHJCommented:
:)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.