• Post Reply Bookmark Topic Watch Topic
  • New Topic

JComboBox  RSS feed

 
andrew mcmillan
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have several JComboBox's in one frame, when i make a selection in the first it gets the information in a model to populate the next...and so on.
my trouble is that when the second JCobmoBox is populated it triggers an action which then populates the third.
but i do not want this to happen.
any suggestions?
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the action that populates the third box are you checking if there is anything selected in the second box? Also in the action in the first box make sure there are no selections in the second.
 
andrew mcmillan
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the trouble is that when i populate the second box the first object added becomes the default selection.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!