i try to remove the function "save" for have only "save as.." but now i have an output error with " save as -_-'

https://www.dropbox.com/s/twtl38huxeeetsx/ProgettoApachePoi.rar

in this link there is my project, i create a java text editor for open docx documents. the text editor should do the basics functions of a text editor, as copy, paste , select all, delete, exit, new, open , save and save as. i tested the code and i have a problem only with the function "save", because the program don't do anything, but " save as" it run correctly. could someone help me to solve the problem. the part of the code that is about "save" is this:

  private void SaveActionPerformed(java.awt.event.ActionEvent evt) {                                     

        if("".equals(CurrentFileDirectory)){

        JFileChooser sdChooser = new JFileChooser();
        FileNameExtensionFilter filter = new FileNameExtensionFilter("Text file", "txt");
        sdChooser.setFileFilter(filter);
        int returnval = sdChooser.showOpenDialog(null);

        try{
            if(returnval == JFileChooser.APPROVE_OPTION){
            File directory = sdChooser.getCurrentDirectory();
               String path = directory.getAbsolutePath();
               String fileName = sdChooser.getSelectedFile().getName();
               if(fileName.contains(".docx")){

               }else{
                   fileName = fileName + ".docx";    
               }
               jTextArea.exportDocument(new FileOutputStream(new File(fileName)));
               //BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(path + "\\" + fileName)));
               //bw.write(jTextArea.getText());
               //bw.close();}
            }
        }catch(IOException e){      
    JOptionPane.showMessageDialog(null, "ERROR!");
        }
    }
    }

yes, because i'm elena and mazmar is my course friend. we had to do a project together!! GENIUS!!!!!
anyway we solved the problem so if you have nothing to do you should came completely naught in another post.

i had to do a complete text editor,so i made two different code. the fisrt code is a text editor that open docx file, create new documents , exit, paste , copy, delete, select all, save and save with name. the second code is another text editor that change colour and font with a bottom , "style". now i'd like to integrate the second code with the first but i don't know how to do , could someone help me. really thanks

code1 - https://www.dropbox.com/s/2mys3olg8dzi18n/texteditor.java
code2 - https://www.dropbox.com/s/4hwqd2ihgztqkdw/FontColore.java

noooo!!!!! i have change a little thing and the code run perfectly!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! really really really thanks !!! <3

commented: You're welcome! +0

hi !!! really really thanks :) now the program print the right numbers, and only one times BUT unfortunately every combinations appears for 1 secon and disappear :'( i send you a video when the uploading is finish :)

http://www.mediafire.com/?r1c21d7z26mfo7p hi :) the code you posted it's different but thanks.. i posted the correct code. but i've a LAST LITTLE PROBLEM. If i write 12321 , the program should print 11 12 13 21 22 23 31 32. and all this numbers are print in the fist line (in pink ) but every number should print only one times. if i digit 12321 , the program print 11, 12 , 12 ,13, 11 ,12 , 12, 13,21,21 ,22,23, 21, 21, 22, 23, ,31, 31,32, 32. how could change the code for print all the number only one time, IN THE FIST LINE ( pink numbers ) ??? really really thanks

I created a program that :

1)write by keyboard a number A of 5 number digits
2)write all the combinations ( 2 digit ) using digits of number A
3)order the combinations

MY PROGRAM DO ALL THIS , but i don't know how to limit the combinations from 4 digits to 2 digits. thanks anf sorry for my bad english!!

https://www.dropbox.com/s/oqat55pxbt0eztb/prog33.txt