This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JComboBox removes arrow after insertItemAt()  RSS feed

 
Alexander Pupkin
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • 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
  • 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!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!