• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Display value and Actual value in JComboBox

 
kashwini Kulkarni
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I want to display values from my database in a JComboBox, where the item being displayed must be the name and the value of the item must be the Srno (primary key) .

Is there any way to display two values in JComboBox ( same as SELECT in HTML) where one being displayed and other being just the value.




Thanks in Advance
KAshwini

 
Rob Camick
Ranch Hand
Posts: 2580
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I understand the question then try this:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic