Thanks!
Li
=========The exception I got============
java.lang.IndexOutOfBoundsException: -1
at java.util.BitSet.get(Compiled Code)
at javax.swing.DefaultListSelectionModel.clear
DefaultListSelectionModel.java:201)
at javax.swing.DefaultListSelectionModel.setState
(DefaultListSelectionModel.java:405)
at javax.swing.DefaultListSelectionModel.removeIndexInterval
(DefaultListSelectionModel.java:457)
at
javax.swing.plaf.basic.BasicListUI$ListDataHandler.intervalRemoved(Ba
sicListUI.java:1071)
at javax.swing.AbstractListModel.fireIntervalRemoved
(AbstractListModel.java:140)
at javax.swing.DefaultComboBoxModel.removeAllElements
(DefaultComboBoxModel.java:167)
at javax.swing.JComboBox.removeAllItems(JComboBox.java:494)
.........
Sent via Deja.com http://www.deja.com/
Before you buy.
First of all: Why do you need to stay with JDK 1.2?
Does this happen every time you clear the box, or only at start up?
Check if its emtpy before clearing it.
MB check the Interface ComboBoxModel (or something like this) for
building your own Model which you can assigne to and remove from the
box like you wish.
Hope this helps you.
If not I would call this a bug. Check
http://developer.java.sun.com/developer/ for Suns BugParade concerning
JDK bugs.
Regards,
Holger