private class Lytterklasse implements ActionListener{
public void actionPerformed(ActionEvent e) {
JFileChooser chooser = new JFileChooser();
FileNameExtensionFilter filter = new FileNameExtensionFilter(
"Sudoku Tekstfiler", "txt");
chooser.setFileFilter(filter);
int returnVal = chooser.showOpenDialog(getParent());
String filnavn=chooser.getName();
In innfil=new In(filnavn);
int type=innfil.inInt();
int lengdeBoks=innfil.inInt();
int breddeBoks=innfil.inInt();
for(int i=0;i<type*type;i++){
tallene[i]=innfil.nextChar();
}
}
}
Why does this crash on me? I cant figure it out. Please help!