Hi.
I get an (identifier) expected error when I try to write my code.
The error message is:
"PathFinder.java:25: (identifier) expected
TList.setSelectionMode(ListSelectionModel.SINGLE.SELECTION);
"PathFinder.java:25: (identifier) expected
TList.setSelectionMode(ListSelectionModel.SINGLE.SELECTION);
My code looks like this:
import...
class PathFinder extends JFrame {
Karta karta;
JFileChooser jfc = new JFileChooser(".");
int RitNR;
JButton NP;
ListGraph g = new ListGraph();
ArrayList<String> stader = new ArrayList<String>();
private DefaultListModel DefListMod = new DefaultListModel();
private JList TList = new JList(DefListMod);
private JList FList = new JList(DefListMod);
TList.setSelectionMode(ListSelectionModel.SINGLE.SELECTION); // I don't understand
why it doesn't work
here
...