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


Groups > comp.lang.java.gui > #4728

Re: JComboBox drop-down arrow disappears

From "John B. Matthews" <nospam@nospam.invalid>
Newsgroups comp.lang.java.gui
Subject Re: JComboBox drop-down arrow disappears
Date 2011-11-01 13:06 -0400
Organization The Wasteland
Message-ID <nospam-89FE72.13063401112011@news.aioe.org> (permalink)
References <d05844e4-ec76-45ca-bcf3-f3fdabfb3356@v33g2000prm.googlegroups.com>

Show all headers | View raw


In article 
<d05844e4-ec76-45ca-bcf3-f3fdabfb3356@v33g2000prm.googlegroups.com>,
 Amandil <mazwolfe@gmail.com> wrote:

> Does anyone else have this problem? Is it documented anywhere? 
> Calling removeAllItems() on a JComboBox caused the drop-down arrow to 
> disappear. It did not reappear even after the JComboBox was 
> repopulated. (The code is rather long, though I can attach it if 
> someone would need it to help with this issue).
> 
> I'd appreciate anyone's help with this issue.

Using either removeAllItems() on the combo or removeAllElements() on the 
combo's model, I am unable to reproduce this effect. For reference, my 
implementation uses com.apple.laf.AquaComboBoxUI.

Rather than posting a lengthy example, prepare an sscce [1] that others 
may examine more easily. Be sure to identify your chosen look & feel.

It may also help to elaborate on the problem you are trying to solve. 
For example, this ComboTest [2] avoids removing anything by preparing a 
number of models in advance.

[1] <http://sscce.org/>
[2] <http://stackoverflow.com/questions/3191882>

-- 
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>

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


Thread

JComboBox drop-down arrow disappears Amandil <mazwolfe@gmail.com> - 2011-11-01 08:40 -0700
  Re: JComboBox drop-down arrow disappears Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-11-01 09:29 -0700
  Re: JComboBox drop-down arrow disappears "John B. Matthews" <nospam@nospam.invalid> - 2011-11-01 13:06 -0400
    Re: JComboBox drop-down arrow disappears Roedy Green <see_website@mindprod.com.invalid> - 2011-11-01 23:20 -0700
  Re: JComboBox drop-down arrow disappears Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-11-01 17:31 +0000
    Re: JComboBox drop-down arrow disappears Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-11-01 10:48 -0700
    Re: JComboBox drop-down arrow disappears Roedy Green <see_website@mindprod.com.invalid> - 2011-11-01 23:22 -0700
  Re: JComboBox drop-down arrow disappears Amandil <mazwolfe@gmail.com> - 2011-11-01 13:22 -0700
  Re: JComboBox drop-down arrow disappears Roedy Green <see_website@mindprod.com.invalid> - 2011-11-01 23:19 -0700
  Re: JComboBox drop-down arrow disappears Bent C Dalager <bcd@pvv.ntnu.no> - 2011-11-02 09:41 +0000
  Re: JComboBox drop-down arrow disappears "dp" <newsgroups@phagia.net> - 2011-11-06 12:14 +0000

csiph-web