Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   JList (http://www.velocityreviews.com/forums/t142688-jlist.html)

Anitha Namachivayam via JavaKB.com 04-13-2005 05:48 AM

JList
 
Hello,
How to add a single element to the JList at run time?

Thanks,
Sri

--
Message posted via http://www.javakb.com

Arnaud Berger 04-13-2005 07:11 AM

Re: JList
 
Hi,

If the JList was constructed with new JList(new DefaultListModel()),

doing : ((DefaultListModel)jList.getModel()).addElement(so meObject);

should work.

Regards,
Arnaud

"Anitha Namachivayam via JavaKB.com" <forum@nospam.JavaKB.com> a écrit dans
le message news: 0e940ebe4f874a69be56c07d63e69eb5@JavaKB.com...
> Hello,
> How to add a single element to the JList at run time?
>
> Thanks,
> Sri
>
> --
> Message posted via http://www.javakb.com





All times are GMT. The time now is 04:47 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.