How do I print a DefaultListModel to a txt with the push of a button?
Here is what I got so far.
Code:public static void savetotxt (DefaultListModel d){
try {
// FileWriter filer = new FileWriter("Boklista.txt");
// BufferedWriter out = new BufferedWriter(fstream);
FileOutputStream f = new FileOutputStream(d);
ObjectOutputStream s = new ObjectOutputStream(f);
} catch (IOException e) {
e.printStackTrace();
}
}

