• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JComboBox removes arrow after insertItemAt()

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Would you, please, help to find the reason to JComboBox to remove arrow from itself after all of items to be chosen added?

combo box is created by NetBeans GUI builder, later on I'm adding items to the list in two different forms. Code is pretty the same, but on one form this arrow left as it should be, on another - arrow disappear, still this box behave itself like a combo box, but without an arrow.

In both cases it's a method call like that: "nodesLinksComboBox.insertItemAt(e.nextElement(), i);"

with later on jComboBox and jPanel validate() and repaint() call.

Any ideas will be appreciated.
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
> Any ideas will be appreciated.

supplying the errant code would be better
 
Alexander Pupkin
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
starting isolating the problematic code found the reason: not only validate(), but updateUI() was also needed.

sorry for the disturbance and time spend!
 
Why am I so drawn to cherry pie? I can't seem to stop. Save me tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic