loading a file and getting its contents crashes on me.
- by Richards
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
}
Why does this crash on me? I cant figure it out. Please help!