Hallo,
ich wäre sehr dankbar wenn mir mal wer helfen könnte.
Ich versuche ein Bild mit dem FileDialog auf der Festplatte zu speichern.
Das Laden hat folgendermaßen geklappt:
FileDialog loadDialog = new FileDialog(this,"Bild laden",FileDialog.LOAD);
loadDialog.setFile("*.bmp;*.jpg;*.jpeg;*.png");
loadDialog.setVisible(true);
String dir = loadDialog.getDirectory();
String name = loadDialog.getFile();
BildDatei biDat = new BildDatei(dir,name);
Der Code zum Abspeichern sieht momentan so aus:
FileDialog saveDialog = new FileDialog(this,"Bild speichern",FileDialog.SAVE);
saveDialog.setVisible(true);
String dir = saveDialog.getDirectory();
String name = saveDialog.getFile();
Kann mir einer sagen, wie ich weitermachen muss?
Biite nicht meckern, bin Anfänger.
Gruß