aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JList Refresh Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JList Refresh" Watch "JList Refresh" New topic
Author

JList Refresh

Pavan Kumar
Greenhorn

Joined: Jan 13, 2002
Posts: 8
Hi all,

I need to add item from one Jlist to other Jlist, when I click a add button, the item which is added to Jlist should be visibble. Please let me know how to do coding.

Hari.


pavan kuamr
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
from #1 JList you use getSelectedValue()
add this to #2 JList's listModel

to have this item showing, use this method
list2.ensureIndexIsVisible(listModel.size()-1)
(assuming you want it added to the end of #2)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JList Refresh