File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes combo.getSelectedItem problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "combo.getSelectedItem problem" Watch "combo.getSelectedItem problem" New topic
Author

combo.getSelectedItem problem

miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
i populate this combo from database and wrote some code that prints the selected object's id
i've this button that deletes the selected item; what happens is that, when i delete several items, suddenly my printlines show repeated ids, say 3 or 4 lines with the very same info and only from one single click.
this is problem one; my second problem is that i cant retrieve my last item, because when there's only one left it doesnt print at all, like it wasnt never selected
my relevant code (i tried action event and item event):


what am i doing wrong?

TiA


java amateur
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: combo.getSelectedItem problem
 
Similar Threads
Urgent JComboBox!!!
jtable problem please help
Bug or Feature of JComboBox
Urgent help needed..plsss
combobox rendered in a Jtable