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

Howdy, Stranger!

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

Categories

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

mustafaaltupmustafaaltup sudanPosts: 1Member

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

Answers

  • chipkahuchipkahu VietNamPosts: 2Member

    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.