• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to print values in pre defined reciept  RSS feed

 
Manu Khullar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Not sure if this is the right place to post my question!!
In my project i have to print some values in a predefined receipt.
can anyone tell me how to do this...

Example:

Employee Receipt-
Name:
Age:
Address:
Designation:
Salary:

the above information will be printed on a piece of paper. what i have to do is, to print the values in the right place....

Employee Receipt-

Name: XYZ
Age: XYZ
Address:XYZ
Designation:XYZ
Salary:XYZ

How can i do this in JAVA. please reply
Thanks in advance!!!
 
fred rosenberger
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The simplest way would be something like this:

System.out.println(" " + empName);
 
Manu Khullar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear fred,

thanks for your reply...
i guess, i was not able explain my problem.
the employee receipt shown in example will be printed on a paper by default.
what i have to do is on a print command the employee name , age ... etc should get printed in front of their respective columns

i have no idea how will i do that with System.out.println(" " + empName);

can you please explain me...
it will be again a great help.

Thanks!

 
Manu Khullar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what i got it so far is that i have to use print api.

but which class or interface and method.... that i dont know
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!