如何将texfile放入列表视图?

时间:2019-05-08 21:10:15

标签: java arrays javafx

public class createTextFile() {
    public createTextFiele() {

        File file = new File("anus.txt");

        //Create the file
        if (file.createNewFile()) {
            System.out.println("File is created!");
        } else {
            System.out.println("File already exists.");
        }

        //Write Content
        FileWriter writer = new FileWriter(file);
        writer.write("Test data");
        writer.close();
    }

}



public class putInsideListView() {
    protected final ListView listView;

    public putInsideListView() {
        listView = new ListView();
    }

    //now put the content of the anus.txt into the listView, let us pretend there is like 10 names in there
}

0 个答案:

没有答案