ecco il codice :
codice:
....
JFileChooser fileChooser = new JFileChooser();
fileChooser.setDialogTitle("Salva file su disco");
fileChooser.setFileFilter(new zipFileFilter());
fileChooser.setCurrentDirectory(new File ("."));
fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
fileChooser.showSaveDialog(button);
File myFile = fileChooser.getSelectedFile();
String myPath = myFile.getPath();
File parent = new File (ScaricaFrame.cartella+"_"+label+"_"+ScaricaFrame.Fileest+".zip");
fileChooser.setSelectedFile(new File(fileChooser.getCurrentDirectory(),"test.zip"));
FileOutputStream fos = new FileOutputStream (myPath + parent);
BufferedOutputStream bout = new BufferedOutputStream (fos,1024);
byte data[] = new byte [1024];
while(in.read(data,0,1024)>=0){
bout.write(data);
...