Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error at addListSelectionListener(this)

 
deepak carter
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

its showing an in the line // list.addListSelectionListener(this);

 
Rob Spoor
Sheriff
Pie
Posts: 20667
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Next time please show the error. However, this time it's pretty obvious - this is an instance of JListTest, and that does not implement ListSelectionListener.
 
Randall Twede
Ranch Hand
Posts: 4481
3
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it was even obvious to me. you have to implement the listener interface
 
Darryl Burke
Bartender
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or better still, add a ListSelectionListener in the form of an anonymous inner class.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic