I'm making a system for a restaurant. I have an order text file that saves details of the order with order details I want the user to be able to input an order ID and then only read from this order text file.
Currently I am able to read the entire textfile and display it in jTextArea, my code is:
string file_name = "login / orders.txt"; Try (BufferedReader accReader = new BufferedReader (new FileReader (file_name)) {ReadFile file = new readfile (file_name); String [] aryLines = file. OpenFile (); Int i; (I = 0; i & lt; aryLines.length; i ++) for {txtFullOrder2.append ("\ n" + erilline [i]); }} Hold (IOException pre) {JOptionPane.showMessageDialog (blank, "error"); }}
Any help would be greatly appreciated, thanks!
No comments:
Post a Comment