• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to print a panel (report) in swing

 
Ranch Hand
Posts: 1143
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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]
 
Bartender
Posts: 563
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 1143
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
reply
    Bookmark Topic Watch Topic
  • New Topic