I have a list which consists of names and a button to delete the selected name when clicked. The names in the list are read from a database. When I click on the button to delete the selected entry, I get an error like this on the terminal window and the entry is not deleted:
The bug may be evident but I am not able to fix it. Kindly help me get over with this.
kingmansoor
Rob Camick
Ranch Hand
Joined: Jun 13, 2009
Posts: 1791
2
posted
0
Read the JList API and follow the link to the Swing tutorial on "How to Use Lists' for a working example that dynamically adds/removes items from a JList.
Mansoor Khan
Greenhorn
Joined: Apr 14, 2008
Posts: 17
posted
0
I did that. Can you please help me find where I am wrong in my code?