Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #19848

Re: JComboBox with DefaultComboBoxModel doesn't allow to add or remove

Newsgroups comp.lang.java.programmer
Date 2012-11-22 04:03 -0800
References <6b564835-30c6-4fd7-86fb-d89693675be4@googlegroups.com> <k8j785$bia$1@dont-email.me>
Message-ID <15fd295b-fc0f-4403-b47f-9842984febf5@googlegroups.com> (permalink)
Subject Re: JComboBox with DefaultComboBoxModel doesn't allow to add or remove
From Rotariu Mihai <rotariu.mihai7@gmail.com>

Show all headers | View raw


On Wednesday, 21 November 2012 19:41:10 UTC+1, markspace  wrote:
> On 11/21/2012 4:27 AM, Rotariu Mihai wrote:
> 
> > The problem is
> 
> > that before having the AutoComplete feature I could just say
> 
> > jComboBox1.removeAllItems(); but now because of the model I have to
> 
> > do it with model.removeAllElements();
> 
> 
> 
> 
> 
> Why do you have to do that?  If you're using the right kind of model, 
> 
> shouldn't removeAllItems() call the model appropriately?
> 
> 
> 
> Please, please, please show us an SSCCE -- a short, self-contained 
> 
> compilable example.  We can't really tell what is going on unless you 
> 
> provide one.
> 
> 
> 
> sscce.org




I updated my post on another java forum where I have a very simple example why is not working. If you have the time and the patience please check 

http://stackoverflow.com/questions/13491053/jcombobox-with-defaultcomboboxmodel-doesnt-allow-to-add-or-remove

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

JComboBox with DefaultComboBoxModel doesn't allow to add or remove Rotariu Mihai <rotariu.mihai7@gmail.com> - 2012-11-21 04:27 -0800
  Re: JComboBox with DefaultComboBoxModel doesn't allow to add or remove Roedy Green <see_website@mindprod.com.invalid> - 2012-11-21 06:31 -0800
  Re: JComboBox with DefaultComboBoxModel doesn't allow to add or remove markspace <-@.> - 2012-11-21 10:41 -0800
    Re: JComboBox with DefaultComboBoxModel doesn't allow to add or remove Rotariu Mihai <rotariu.mihai7@gmail.com> - 2012-11-22 04:03 -0800
      Re: JComboBox with DefaultComboBoxModel doesn't allow to add or remove Knute Johnson <nospam@knutejohnson.com> - 2012-11-22 10:37 -0800
  Re: JComboBox with DefaultComboBoxModel doesn't allow to add or remove "John B. Matthews" <nospam@nospam.invalid> - 2012-11-21 20:45 -0500

csiph-web