Solved

Assigning the content of an arrayList to JList

Posted on 2006-07-23
2
2,527 Views
Last Modified: 2006-11-18
I want to assign the content of an arrayList to JList it cannot be done.
But if I use Array it was OK.

So, Can I assign an arrayList to JList with out converting the arrayList to array?

-----------------------

I tried this :


JList list = new JList(arrayList);
0
Comment
Question by:javamate06
[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
  • 2
2 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 30 total points
ID: 17162995
You can do

JList list = new JList(new Vector(arrayList));
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 17163051
:-)
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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This video teaches viewers about errors in exception handling.

717 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