Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What listener to implement for JList?

 
Bud Tippins
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following code in NetBeans. On line #7 I'm getting the following error: "cannot find symbol - symbol: class ListSelectionListener" - question: what Listener should I have ListTest implement for a JList?

Thank you.



 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ListSelectionListener is part of javax.swing.event package which you haven't imported in your Java code.
 
Bud Tippins
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. That worked.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic