C:\Users\rob\Documents\TextArea1.java:72: cannot find symbol
symbol : class ListSelectionEvent
location: class TextArea1.ListBoxClick
public void valueChanged(ListSelectionEvent lse) {
^
C:\Users\rob\Documents\TextArea1.java:40: addListSelectionListener(javax.swing.event.ListSelectionListener) in javax.swing.JList cannot be applied to (TextArea1.ListBoxClick)
list.addListSelectionListener(new ListBoxClick());
^
C:\Users\rob\Documents\TextArea1.java:71: TextArea1.ListBoxClick is not abstract and does not override abstract method actionPerformed(java.awt.event.ActionEvent) in java.awt.event.ActionListener
class ListBoxClick implements ActionListener {
^
3 errors
C:\Users\Rob\Documents\TextArea1.java:41: addListSelectionListener(javax.swing.event.ListSelectionListener) in javax.swing.JList cannot be applied to (TextArea1.ListBoxClick)
list.addListSelectionListener(new ListBoxClick());
^
C:\Users\Rob\Documents\TextArea1.java:72: TextArea1.ListBoxClick is not abstract and does not override abstract method actionPerformed(java.awt.event.ActionEvent) in java.awt.event.ActionListener
class ListBoxClick implements ActionListener {
^
2 errors
Think you're getting this error because you're implementing ActionListener in you class ListBoxClick, and the method addListSelectionListener asks for a ListSelectionListener. Both extend EventListener, but they are different.
You should implement ListSelectionListener and override the method valueChanged.