• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to print a panel (report) in swing  RSS feed

 
Punit Jain
Ranch Hand
Posts: 1085
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everyone,
i need to generate report, i have a predefined format (hard copy), in this format, (below image)
i have standalone application, and want values from that in these fills(in the image).
i need to do this using java priting inteface.
but how do this type of format??
i m new to this.
report.PNG
[Thumbnail for report.PNG]
 
Greg Brannon
Bartender
Posts: 563
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could "draw" the required format on a Swing container, like a JPanel, using graphics boxes, lines, and text, OR you could use Swing components, like JLabels, JTextFields, JTextAreas, etc. added to a container, again like a JPanel, laid out to resemble the graphic you've shown us. I'm going to assume you'd prefer the latter and suggest that if this is your first Swing project, you should consult the Swing Tutorials for help. The tutorials will suggest you use Netbeans and the GUIBuilder, but please ignore that part and learn to do it by hand, without the GUIBuilder.
 
Punit Jain
Ranch Hand
Posts: 1085
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for response.

You could "draw" the required format on a Swing container, like a JPanel, using graphics boxes, lines, and text, OR you could use Swing components, like JLabels, JTextFields, JTextAreas, etc. added to a container, again like a JPanel, laid out to resemble the graphic you've shown us.


yes this i will do, but i want to know, although on my paper(hardcopy on which report is being print), has the fix header and footer, and the report i need to print is to print in between, these header and footer, so how i will do that??
i mean how i will set these positions, i mean how i set my report in between the page??
if simply i will do, it will start from beginning of the page(hard copy).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!