• Post Reply Bookmark Topic Watch Topic
  • New Topic

error linking the JRadio button with the JList

 
sae0203
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can i link JRadioButton with JList... meaning when i click on the type book, the JList will display only the ID of book and not other thing else.
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put a Listener on your RadioButton. When it is selected have some code in the Listener filter through the IDs and get only the ones that you want, and modify the JList to contain only these items.
 
sae0203
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!