How to print text files from folder through Java interface -
How to print text files from folder through Java interface -
i building gui read text file generate , write alpha-numeric codes text document (.txt) based on user input. have read deal on how print text files java using declarations under "public static void main(string args []){" section using, way of illustration (i understand may not work , not code):
public static void main(string args[]) { fileinputsteam fis = new fileinputstream(filename); doc txtdoc = new simpledoc(fis, null, null); docprintjob printjob = printservice.creatprintjob(); printjob.print(txtdoc, new hasprintrequestattributeset()); fis.close();}
i haven't read much how phone call file specific location in folder, same file created user input, , print upon user command through interface, though.
for instance, how create above capable of working under a
private void printallbtnactionperformed(java.awt.event.actionevent evt) {
sub-declaration appears above 'public static void main...' declaration?
any assistance appreciated. thanks!
java file-io
Comments
Post a Comment