View Single Post
  #1 (permalink)  
Old 04-08-2008, 03:17 AM
Rageagainst20 Rageagainst20 is offline
Member
 
Join Date: Dec 2007
Posts: 8
Rageagainst20 is on a distinguished road
Listbox Add/Delete
I have read countless tutorials on how to do this yet I am still stuck

I think the problem is that most tutorials are manually drawing their Lists

I have a JFrame with a JList dragged onto it (I am using Netbeans)

I want to press one button to add to the list box and one to delete (delete the item selected)

I have tried using getSelectedIndex etc

But it doesn't delete anything and a lot of errors occur in the Output console

I have seen a lot of mention of something like DefaultListModel or something named similar

Where can I be going wrong, there isn't even a remove option like most tutorials say. Let me repeat for clarities sake I am a newb I only started using this program 2 weeks ago but I know that I don't want to draw a New list box in another form

Thanks
Reply With Quote
Sponsored Links