Win a copy of Practical SVG this week in the HTML/CSS/JavaScript 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
Posts: 20822
68
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: 4520
6
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: 5155
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
Boost this thread!