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

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -