Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

adding/removing from JListBox  RSS feed

 
Dave Brown
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all again.

What i'm wanting to do is the classic case of two listboxes side by side, with a << button and a >> button between them, allowing me to move items from either listbox to the other.

Its proving really tricky as there is no AddItem() or RemoveItem() method which I would have expected..

Does anyone know any sample code for this problem or perhaps any third party listboxes which are easier to deal with without having to write lots of additional code which seems to me a bit of overkill just to add an item to a listbox....

Rgds,

Dave.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> as there is no AddItem() or RemoveItem() method
they are in the ListModel

try this

 
Dave Brown
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks very much. :-)

Dave.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!