I got the scoreboad to work Sort of. Know I am working on a prog that will write text to a file.
I did it in a consule but cant get it into a G U I ...
this is what I used and it worked, but know I have to get it into a GUI![]()
![]()
Code:package other; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; public class WritingToFile { private static void doWrite() { try { String fileName = "WritingToFile.out"; BufferedWriter out = new BufferedWriter(new FileWriter(fileName)); out.write("+---------- Testing output to a file ----------+"); out.write(0x0A); out.write("\n"); out.write("+---------- Testing output to a file ----------+"); out.close(); } catch (IOException e) { System.out.println("IOException:"); e.printStackTrace(); } } /** * @param args */ public static void main(String[] args) { doWrite(); } }


Reply With Quote


Bookmarks