I want to help , I need code on btou Button to save text in jtextfiled on Desktop

I need code on btou Button to save text in jtextfiled on Desktop

Comments

  • public void savetext(String filename)
    {
    try
    {
    String msg = jtextfiled.getText();
    fr = new FileWriter(filename);
    fr.write(msg);
    fr.flush();
    fr.close();
    }
    catch (Exception e) {
    e.printStackTrace();
    }
    }

    here is the function that you write out a text file. where "filename" is the path to the text file that you need to save to. hopefully be useful to you.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion