Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Assigning the content of an arrayList to JList

Posted on 2006-07-23
2
Medium Priority
?
2,535 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
  • 2
2 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 120 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month21 days, 6 hours left to enroll

810 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