Article View: borland.public.jbuilder.java.swing
Article #10575Re: JComboBox problem.
From: Timothy Reaves
Date: Thu, 26 Aug 1999 00:00
Date: Thu, 26 Aug 1999 00:00
45 lines
2704 bytes
2704 bytes
They are my domain objects. I override toString() to have them display the data I want displayed. All of my Combo's work this way. As to what is different, well, all of it basically. I'm sure it is a method collision or something, I'm just not sure what. Kevin O'Sullivan wrote: > Tim, > > What type of object are you storing in the vector which causes the > exception - and how does this object differ from the objects in Vectors > which don't cause the problem? > > Timothy Reaves <treaves@silverfields.com> wrote in message > news:37C1B5EE.1ECCDE51@silverfields.com... > > I use many JComboBoxes to display Vectors of objects. I create all > > of them the same way: > > jCombo.setModel(new DefaultComboBoxModel(myVector)); > > This works very well except for one instance. In this instance - where > > ever I use this particular Vector - when I select an object from the > > JCombo I get an exception. Now mind, I'm not attaching anything to the > > JCombo that does anything. This is an ordinary JCombo with no attached > > action listeners or anything. > > > > The first section below is the actual exception and stack, and the > > second section is when the stack is finally finished and I regain > > control of the app. When this happens, the JCombo looks normal, except > > that my selection is not selected. > > > > One more piece of information: if I first add something to the > > JCombo (these are on data entry forms) by setting the model, then > > changeing to a new model (of the same Vector just with an added > > element), then try to select something from the JCombo, I NEVER regain > > control of the app. It prints out the same exception but then hangs. > > Odd. > > > > Exception occurred during event dispatching: > > java.lang.StackOverflowError > > at java.lang.ref.Finalizer.register(Finalizer.java:79) > > at javax.swing.JComboBox.selectedItemChanged(JComboBox.java:667) > > at javax.swing.JComboBox.contentsChanged(JComboBox.java:730) > > at > > > javax.swing.AbstractListModel.fireContentsChanged(AbstractListModel.java:82) > >
Technical Details
Message-ID:
<37C57CE3.30421A9B@silverfields.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<37C1B5EE.1ECCDE51@silverfields.com> <7pv2c4$jn611@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,d0aca1e7902612c5 X-Google-Attributes: gid111d45,public From: Timothy Reaves <treaves@silverfields.com> Subject: Re: JComboBox problem. Date: 1999/08/26 Message-ID: <37C57CE3.30421A9B@silverfields.com> X-Deja-AN: 517519904 Content-Transfer-Encoding: 7bit References: <37C1B5EE.1ECCDE51@silverfields.com> <7pv2c4$jn611@forums.borland.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Silverfields Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing